Skip to content

Commit

Permalink
Update tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
Taztingo committed May 17, 2024
1 parent c70d667 commit 2e95fef
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
10 changes: 4 additions & 6 deletions x/ibchooks/ibc_middleware_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)
}
Expand Down Expand Up @@ -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,
}
Expand Down Expand Up @@ -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:
Expand All @@ -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() {
Expand Down
6 changes: 3 additions & 3 deletions x/ibchooks/marker_hooks_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit 2e95fef

Please sign in to comment.