-
Notifications
You must be signed in to change notification settings - Fork 586
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
chore: expect specific errors in apps/transfer #7205
Conversation
{ | ||
"invalid trace", | ||
func() { | ||
req = &types.QueryDenomHashRequest{ | ||
Trace: "transfer/channelToA/transfer/", | ||
Trace: "transfer%%/channel-1/transfer/channel-1/uatom", |
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 test was not triggering the "invalid trace" error but the "denom not found one". Thanks @crodriguezvega for the help!!
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.
Is the %% what triggers invalid trace here?
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.
To my understanding yes, but this is all @crodriguezvega!
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.
Yes, correct. The %%
triggers invalid trace error.
{ | ||
"success", | ||
func() {}, | ||
true, |
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.
moved on top
testing/utils.go
Outdated
@@ -81,3 +83,12 @@ func UnmarshalMsgResponses(cdc codec.Codec, data []byte, msgs ...codec.ProtoMars | |||
|
|||
return nil | |||
} | |||
|
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 was also added in another in-flight PR. There should be no merge conflicts, but I'll take care of them if they arise :)
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.
😍
The linter is complaining about the new function, but not sure what it's trying to tell us...
suite.Require().NoError(err) | ||
suite.Require().NotNil(res) | ||
suite.Require().Equal(&expDenom, res.Denom) | ||
} else { | ||
suite.Require().Error(err) | ||
ibctesting.RequireErrorIsOrContains(suite.T(), err, tc.expErr, err.Error()) |
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.
Maybe in a separate PR we should update other tests where this function could be used... More refactoring of tests, yay!!
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.
Definitely! But I think after these I'll take a break from refactoring tests :D
Quality Gate passed for 'ibc-go'Issues Measures |
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.
Nice one, thanks @bznein!
{ | ||
"invalid trace", | ||
func() { | ||
req = &types.QueryDenomHashRequest{ | ||
Trace: "transfer/channelToA/transfer/", | ||
Trace: "transfer%%/channel-1/transfer/channel-1/uatom", |
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.
Is the %% what triggers invalid trace here?
Description
ref: #7175
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/
).godoc
comments.Files changed
in the GitHub PR explorer.SonarCloud Report
in the comment section below once CI passes.