-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Use test wrapper in more tests #2222
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
Conversation
Signed-off-by: David Gageot <[email protected]>
Codecov Report
@@ Coverage Diff @@
## master #2222 +/- ##
==========================================
+ Coverage 58.1% 58.15% +0.05%
==========================================
Files 188 188
Lines 7869 7869
==========================================
+ Hits 4572 4576 +4
+ Misses 2924 2922 -2
+ Partials 373 371 -2
Continue to review full report at Codecov.
|
|
||
if test.shouldErrSet { | ||
if test.shouldErr { | ||
// if we expect an error when setting, don't try and unset | ||
return | ||
} | ||
|
||
// unset the value | ||
err = unsetConfigValue(test.key) | ||
newConfig, cfgErr := readConfig() |
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.
not an issue with this PR. But we shd de-couple testing set and unset behavior in the same test into 2 separate tests.
"reflect" | ||
) | ||
|
||
func (t *T) CheckErrorAndTypeEquality(shouldErr bool, err error, expected, actual interface{}) { |
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.
Very nice! There were times when i felt i shd check error type!
Thank you for adding this.
Signed-off-by: David Gageot [email protected]