-
Notifications
You must be signed in to change notification settings - Fork 641
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
refactor(tests): use multidenom by default in relay_test #6767
Conversation
nil, | ||
}, | ||
{ | ||
"successful transfer with non-empty forwarding hops and ics20-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.
moved up
nil, | ||
}, | ||
{ | ||
"successful transfer of IBC token with memo", |
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.
ditto
@@ -162,14 +161,6 @@ func (suite *KeeperTestSuite) TestSendTransfer() { | |||
}, | |||
channeltypes.ErrChannelCapabilityNotFound, | |||
}, | |||
{ | |||
"failure: timeout height and timeout timestamp are zero", |
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.
was testing packet validation logic, this lead to needing to specify the expected values as 100, 100 even though it failed (because it failed after we had set those amounts and since we just directly send message to function, reverting of state doesnt occur)
@@ -214,25 +199,28 @@ func (suite *KeeperTestSuite) TestSendTransfer() { | |||
err = path.RelayPacket(packet) | |||
suite.Require().NoError(err) | |||
|
|||
// Value that can malleated for Transfer we are testing. |
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 after msg transfer to create ibc denom on a to avoid confusion
3c8fb4b
to
9167213
Compare
|
||
// denom trace of tokens received on chain B and the associated expected metadata | ||
denomOnB := types.NewDenom(sdk.DefaultBondDenom, types.NewHop(path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID)) | ||
expDenomMetadataOnB := banktypes.Metadata{ |
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 eye-sore so moved it to separate little func, can add back if people are feeling strongly about this.
9167213
to
34a6e28
Compare
suite.Require().NoError(err) // message committed | ||
|
||
packet, err := ibctesting.ParsePacketFromEvents(res.Events) |
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.
completely refactored this. It was initially sending a packet from B to A, relaying it then doing another transfer from A to B. Simplified to match other receive test, namely, send a packet from A to B and then simulate a packet being received on A that has the right trace to signify A being original source.
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.
Love the cleanup 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.
Great work refactoring these, @DimitrisJim!
…on. Add shorthand vars for common sdkmath constants
6e03d11
to
3a42ac0
Compare
Quality Gate passed for 'ibc-go'Issues Measures |
Description
first batch for TestSendTransfer and the table OnRecv Is/IsNot Source ones. The ack/timeout ones are main ones left atm.
closes: #XXXX
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.