-
Notifications
You must be signed in to change notification settings - Fork 596
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
Add missing channel upgrade tests #5502
Add missing channel upgrade tests #5502
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5502 +/- ##
==========================================
+ Coverage 80.96% 81.06% +0.10%
==========================================
Files 197 197
Lines 15221 15221
==========================================
+ Hits 12323 12339 +16
+ Misses 2427 2413 -14
+ Partials 471 469 -2
|
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.
left a couple of Qs, lgtm overall 💪
tc := tc | ||
suite.Run(tc.name, func() { | ||
suite.SetupTest() | ||
_, err := keeper.Keeper.UpdateChannelParams(*suite.chainA.App.GetIBCKeeper(), suite.chainA.GetContext(), tc.msg) |
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.
want to also add a check for nil/non-nil assert on the resp?
@@ -27,10 +28,10 @@ func DefaultParams() Params { | |||
// Validate the params. | |||
func (p Params) Validate() error { | |||
if !p.UpgradeTimeout.Height.IsZero() { | |||
return fmt.Errorf("upgrade timeout height must be zero. got : %v", p.UpgradeTimeout.Height) | |||
return errorsmod.Wrapf(ErrInvalidTimeout, "upgrade timeout height must be zero. got : %v", p.UpgradeTimeout.Height) |
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.
this seems to be 'invalid packet timeout'
yea? Do we want separate error? I'm actually not finding other references for that error tbh 🤔
edit: we could just tweak err message?
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.
good call, it looks like we already have a ErrInvalidUpgradeTimeout
, we can use that instead!
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.
Looks fantastic to me. Thanks, @chatton!
(cherry picked from commit b2368fa) # Conflicts: # modules/core/04-channel/types/msgs.go # modules/core/keeper/msg_server_test.go
* Add missing channel upgrade tests (#5502) (cherry picked from commit b2368fa) # Conflicts: # modules/core/04-channel/types/msgs.go # modules/core/keeper/msg_server_test.go * fix conflicts --------- Co-authored-by: Cian Hatton <[email protected]> Co-authored-by: Carlos Rodriguez <[email protected]>
Description
closes: #5485
Add missing tests for channel upgrades
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.Files changed
in the Github PR explorer.Codecov Report
in the comment section below once CI passes.