-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
store/types: Fix pruning opts validation #6511
Conversation
Codecov Report
@@ Coverage Diff @@
## master #6511 +/- ##
==========================================
+ Coverage 56.34% 56.36% +0.01%
==========================================
Files 470 470
Lines 28232 28234 +2
==========================================
+ Hits 15907 15913 +6
+ Misses 11200 11195 -5
- Partials 1125 1126 +1 |
for _, tc := range testCases { | ||
po := NewPruningOptions(tc.keepRecent, tc.keepEvery, tc.interval) | ||
err := po.Validate() | ||
require.Equal(t, tc.expectErr, err != nil, "options: %v, err: %s", po, 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.
require.Equal(t, tc.expectErr, err != nil, "options: %v, err: %s", po, err) | |
if tc.expectErr { | |
require.Error(t, err, po) | |
} else { | |
require.NoError(t, err, po) | |
} |
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.
whyyyyy
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.
ACK
* store/types: Fix pruning opts validation * store/types: Add case
Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.
docs/
) or specification (x/<module>/spec/
)godoc
comments.Unreleased
section inCHANGELOG.md
Files changed
in the Github PR explorer