-
Notifications
You must be signed in to change notification settings - Fork 253
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
Change cmd setup to bubble up errors over exiting #454
Conversation
Their most recently public accepted PR is: briandowns/spinner#125 |
Codecov Report
@@ Coverage Diff @@
## main #454 +/- ##
=======================================
Coverage 81.47% 81.47%
=======================================
Files 27 27
Lines 2186 2186
=======================================
Hits 1781 1781
Misses 312 312
Partials 93 93 Continue to review full report at Codecov.
|
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 (apart from couple of minor nits)
Description
Based on some conversations around testing due to #383, I've done some refactoring of the cobra command section of the code to return errors to the caller and let cobra bubble the error up to the top level call to
Execute
.Motivation & context
This change should allow the functions to be more easily testable instead of requiring potentially complicated test setup due to
os.Exit()
being called by the SUT.Type of change
Checklist: