Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
AdityaSripal committed Jan 23, 2025
1 parent 013ad4f commit 3bd5377
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions modules/core/04-channel/v2/keeper/packet_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -253,13 +253,17 @@ func (suite *KeeperTestSuite) TestWriteAcknowledgement() {
"failure: client not found",
func() {
packet.DestinationClient = ibctesting.InvalidID
suite.chainB.App.GetIBCKeeper().ChannelKeeperV2.SetPacketReceipt(suite.chainB.GetContext(), packet.DestinationClient, packet.Sequence)
suite.chainB.App.GetIBCKeeper().ChannelKeeperV2.SetAsyncPacket(suite.chainB.GetContext(), packet.DestinationClient, packet.Sequence, packet)
},
clienttypes.ErrCounterpartyNotFound,
},
{
"failure: counterparty client identifier different than source client",
func() {
packet.SourceClient = unusedChannel
suite.chainB.App.GetIBCKeeper().ChannelKeeperV2.SetPacketReceipt(suite.chainB.GetContext(), packet.DestinationClient, packet.Sequence)
suite.chainB.App.GetIBCKeeper().ChannelKeeperV2.SetAsyncPacket(suite.chainB.GetContext(), packet.DestinationClient, packet.Sequence, packet)
},
clienttypes.ErrInvalidCounterparty,
},
Expand All @@ -275,9 +279,17 @@ func (suite *KeeperTestSuite) TestWriteAcknowledgement() {
"failure: receipt not found for packet",
func() {
packet.Sequence = 2
suite.chainB.App.GetIBCKeeper().ChannelKeeperV2.SetAsyncPacket(suite.chainB.GetContext(), packet.DestinationClient, packet.Sequence, packet)
},
types.ErrInvalidPacket,
},
{
"failure: async packet not found",
func() {
suite.chainB.App.GetIBCKeeper().ChannelKeeperV2.DeleteAsyncPacket(suite.chainB.GetContext(), packet.DestinationClient, packet.Sequence)
},
types.ErrInvalidAcknowledgement,
},
}

for _, tc := range testCases {
Expand Down

0 comments on commit 3bd5377

Please sign in to comment.