test: Add Unit Test Coverage for Query Util#1027
Conversation
|
@NucleoFusion Could you PTAL into this PR. |
There was a problem hiding this comment.
Pull request overview
Adds unit tests to cover the query-string builder utility used for list command filtering, improving confidence in CLI query construction and validation behavior.
Changes:
- Introduces unit tests for
utils.BuildQueryParamcovering empty input, fuzzy/exact/range query generation, and combined modes. - Adds negative tests for invalid argument formats and invalid keys.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Kartik Angiras <angiraskartik@gmail.com>
680d7b5 to
32bc2e6
Compare
|
Hey @qcserestipy , I have made changes and resolved the review remarks. Could you PTAL. |
|
Nice coverage of the happy paths and the format/key validation errors. A few edge cases in
Optional: these 15 functions are nearly identical in shape — folding them into a single table-driven test with Also, since #1025 asks for both |
Description
Add unit test coverage for pkg/utils/query.go
Type of Change
Please select the relevant type.
Changes