Skip to content

Commit

Permalink
fix(test): reorder logic to fix failing OnChanOpenInit ica tests
Browse files Browse the repository at this point in the history
  • Loading branch information
damiannolan committed Aug 27, 2024
1 parent c125621 commit abd98e3
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -294,11 +294,14 @@ func (suite *KeeperTestSuite) TestOnChanOpenInit() {
Version: string(versionBytes),
}

chanCap, err = suite.chainA.App.GetScopedIBCKeeper().NewCapability(suite.chainA.GetContext(), host.ChannelCapabilityPath(path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID))
suite.Require().NoError(err)
channelID := channeltypes.FormatChannelIdentifier(suite.chainA.GetSimApp().IBCKeeper.ChannelKeeper.GetNextChannelSequence(suite.chainA.GetContext()))
path.EndpointA.ChannelID = channelID

tc.malleate() // malleate mutates test data

chanCap, err = suite.chainA.App.GetScopedIBCKeeper().NewCapability(suite.chainA.GetContext(), host.ChannelCapabilityPath(path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID))
suite.Require().NoError(err)

version, err := suite.chainA.GetSimApp().ICAControllerKeeper.OnChanOpenInit(suite.chainA.GetContext(), channel.Ordering, channel.ConnectionHops,
path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, chanCap, channel.Counterparty, channel.Version,
)
Expand Down

0 comments on commit abd98e3

Please sign in to comment.