From 2e95fef9d2ebc1c9fa2619e672d03bc60dac6146 Mon Sep 17 00:00:00 2001 From: Matthew Witkowski Date: Fri, 17 May 2024 11:08:21 -0400 Subject: [PATCH] Update tests. --- x/ibchooks/ibc_middleware_test.go | 10 ++++------ x/ibchooks/marker_hooks_test.go | 6 +++--- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/x/ibchooks/ibc_middleware_test.go b/x/ibchooks/ibc_middleware_test.go index 7259836ca3..38e1af349f 100644 --- a/x/ibchooks/ibc_middleware_test.go +++ b/x/ibchooks/ibc_middleware_test.go @@ -205,7 +205,7 @@ func (suite *HooksTestSuite) makeMockPacket(receiver, memo string, prevSequence suite.path.EndpointB.ChannelID, suite.path.EndpointA.ChannelConfig.PortID, suite.path.EndpointA.ChannelID, - clienttypes.NewHeight(0, 100), + clienttypes.NewHeight(1, 100), 0, ) } @@ -379,7 +379,7 @@ func NewMsgTransfer( Token: token, Sender: sender, Receiver: receiver, - TimeoutHeight: clienttypes.NewHeight(0, 100), + TimeoutHeight: clienttypes.NewHeight(1, 500), TimeoutTimestamp: 0, Memo: memo, } @@ -429,7 +429,7 @@ func (suite *HooksTestSuite) RelayPacket(packet channeltypes.Packet, direction D return receiveResult, ack } -func (suite *HooksTestSuite) FullSend(msg sdk.Msg, direction Direction) (*sdk.Result, *abci.ExecTxResult, string, error) { +func (suite *HooksTestSuite) FullSend(msg sdk.Msg, direction Direction) (*abci.ExecTxResult, *abci.ExecTxResult, string, error) { var sender *testutil.TestChain switch direction { case AtoB: @@ -445,9 +445,7 @@ func (suite *HooksTestSuite) FullSend(msg sdk.Msg, direction Direction) (*sdk.Re receiveResult, ack := suite.RelayPacket(packet, direction) - // TODO[1760]: ibchooks: Update tests - // return sendResult, receiveResult, string(ack), err - return nil, receiveResult, string(ack), err + return sendResult, receiveResult, string(ack), err } func (suite *HooksTestSuite) TestAcks() { diff --git a/x/ibchooks/marker_hooks_test.go b/x/ibchooks/marker_hooks_test.go index 3cd54888cc..37f81be808 100644 --- a/x/ibchooks/marker_hooks_test.go +++ b/x/ibchooks/marker_hooks_test.go @@ -158,9 +158,9 @@ func (suite *MarkerHooksTestSuite) TestAddUpdateMarker() { metadata, found := suite.chainA.GetProvenanceApp().BankKeeper.GetDenomMetaData(suite.chainA.GetContext(), tc.expIbcDenom) require.True(t, found, "GetDenomMetaData() not found for "+tc.expErr) assert.Equal(t, marker.GetDenom(), metadata.Base, "Metadata Base should equal marker denom") - assert.Equal(t, "testchain2/"+tc.denom, metadata.Name, "Metadata Name should be chainid/denom") - assert.Equal(t, "testchain2/"+tc.denom, metadata.Display, "Metadata Display should be chainid/denom") - assert.Equal(t, tc.denom+" from testchain2", metadata.Description, "Metadata Description is incorrect") + assert.Equal(t, "testchain2-1/"+tc.denom, metadata.Name, "Metadata Name should be chainid/denom") + assert.Equal(t, "testchain2-1/"+tc.denom, metadata.Display, "Metadata Display should be chainid/denom") + assert.Equal(t, tc.denom+" from testchain2-1", metadata.Description, "Metadata Description is incorrect") assert.Len(t, marker.GetAccessList(), len(tc.expTransAuths), "Resulting access list does not equal expect length") for _, access := range marker.GetAccessList() { assert.Len(t, access.GetAccessList(), 1, "Expecting permissions list to only one item")