-
Notifications
You must be signed in to change notification settings - Fork 800
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
admin_db_clean_cmd test Part II #6437
Conversation
if err != nil { | ||
return invariant.ManagerFixResult{}, fmt.Errorf("Error in fix execution: %w", err) | ||
return invariant.ManagerFixResult{}, err |
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.
Why are errors not wrapped?
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.
because it is wrapped in the caller side in if err != nil { return commoncli.Problem("Error in fix execution: ", err) }
set.Var(cli.NewStringSlice("CollectionHistory", "CollectionDomain"), FlagInvariantCollection, "invariant collection flag") | ||
|
||
// Set actual values for the flags | ||
_ = set.Set(FlagScanType, "ConcreteExecutionType") |
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.
nit: check for errors in tests also. If this fails, the test will fail with an unrelated error, and it will be harder to track the issue.
My suggestion - use
require.NoError(t, set.Set(FlagScanType, "ConcreteExecutionType"))
What changed?
Why?
code coverage
How did you test it?
unit test
Potential risks
Release notes
Documentation Changes