-
Notifications
You must be signed in to change notification settings - Fork 107
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
oasis-node/cmd/stake: Make info subcommand tolerate invalid thresholds #2632
Conversation
36a78af
to
bcb5e8e
Compare
Codecov Report
@@ Coverage Diff @@
## master #2632 +/- ##
==========================================
+ Coverage 63.04% 63.29% +0.25%
==========================================
Files 360 360
Lines 34142 34153 +11
==========================================
+ Hits 21524 21617 +93
+ Misses 9966 9872 -94
- Partials 2652 2664 +12
Continue to review full report at Codecov.
|
bcb5e8e
to
bd1490e
Compare
// Check that subcommand reported warnings for invalid staking threshold kinds. | ||
subCmdOutput := b.String() | ||
thresholdKinds := []string{"compute", "storage"} | ||
for _, kind := range thresholdKinds { | ||
if !strings.Contains(subCmdOutput, fmt.Sprintf("invalid staking threshold kind: %s", kind)) { | ||
return fmt.Errorf("scenario/e2e/stake: querying common token info should warn about invalid staking threshold for kind: %s", kind) | ||
} | ||
} |
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.
I didn't know if this check is something we would want or is it testing a detail that is not important enough to be covered?
It replaces the ErrInvalidThreshold previously defined in go/consensus/tendermint/apps/staking.
Change the subcommand to print valid staking threshold kinds and warn about invalid ones. Add test for info subcommand to the stake-cli End-to-End test.
bd1490e
to
255b2f8
Compare
No description provided.