New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tests: cmd unit test version #10689
tests: cmd unit test version #10689
Conversation
Signed-off-by: emirot <emirot.nolan@gmail.com>
Signed-off-by: emirot <emirot.nolan@gmail.com>
Signed-off-by: emirot <emirot.nolan@gmail.com>
Codecov ReportBase: 45.76% // Head: 45.87% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## master #10689 +/- ##
==========================================
+ Coverage 45.76% 45.87% +0.11%
==========================================
Files 236 236
Lines 28529 28530 +1
==========================================
+ Hits 13055 13087 +32
+ Misses 13669 13637 -32
- Partials 1805 1806 +1
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
Signed-off-by: emirot <emirot.nolan@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot @emirot!
Didn't know that cobra provides some of those methods that can be leveraged to actually write some proper unit tests for commands. TIL :)
I have one minor request for change regarding the unit test, please see below.
Signed-off-by: emirot <emirot.nolan@gmail.com>
Signed-off-by: emirot <emirot.nolan@gmail.com>
…o-cd into cmd/unit_test_version
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks @emirot !
* tests: add unit test version command Signed-off-by: emirot <emirot.nolan@gmail.com> * tests: add unit test version command Signed-off-by: emirot <emirot.nolan@gmail.com> * tests: add unit test version command Signed-off-by: emirot <emirot.nolan@gmail.com> * tests: add unit test version command Signed-off-by: emirot <emirot.nolan@gmail.com> * tests: add unit test version command Signed-off-by: emirot <emirot.nolan@gmail.com> * tests: client version Signed-off-by: emirot <emirot.nolan@gmail.com> Signed-off-by: emirot <emirot.nolan@gmail.com>
Adding unit test on client version and small refactoring.
As there is no previous tests, some manual testing to make sure it didn't break anything: