diff --git a/modules/apps/27-interchain-accounts/types/metadata_test.go b/modules/apps/27-interchain-accounts/types/metadata_test.go index 4b6e0810c05..f96174c04d0 100644 --- a/modules/apps/27-interchain-accounts/types/metadata_test.go +++ b/modules/apps/27-interchain-accounts/types/metadata_test.go @@ -299,12 +299,12 @@ func (suite *TypesTestSuite) TestValidateHostMetadata() { testCases := []struct { name string malleate func() - expPass bool + expError error }{ { "success", func() {}, - true, + nil, }, { "success with empty account address", @@ -318,7 +318,7 @@ func (suite *TypesTestSuite) TestValidateHostMetadata() { TxType: types.TxTypeSDKMultiMsg, } }, - true, + nil, }, { "success with EncodingProto3JSON", @@ -332,7 +332,7 @@ func (suite *TypesTestSuite) TestValidateHostMetadata() { TxType: types.TxTypeSDKMultiMsg, } }, - true, + nil, }, { "unsupported encoding format", @@ -346,7 +346,7 @@ func (suite *TypesTestSuite) TestValidateHostMetadata() { TxType: types.TxTypeSDKMultiMsg, } }, - false, + types.ErrInvalidCodec, }, { "unsupported transaction type", @@ -360,7 +360,7 @@ func (suite *TypesTestSuite) TestValidateHostMetadata() { TxType: "invalid-tx-type", } }, - false, + types.ErrUnknownDataType, }, { "invalid controller connection", @@ -374,7 +374,7 @@ func (suite *TypesTestSuite) TestValidateHostMetadata() { TxType: types.TxTypeSDKMultiMsg, } }, - false, + connectiontypes.ErrInvalidConnection, }, { "invalid host connection", @@ -388,7 +388,7 @@ func (suite *TypesTestSuite) TestValidateHostMetadata() { TxType: types.TxTypeSDKMultiMsg, } }, - false, + connectiontypes.ErrInvalidConnection, }, { "invalid address", @@ -402,7 +402,7 @@ func (suite *TypesTestSuite) TestValidateHostMetadata() { TxType: types.TxTypeSDKMultiMsg, } }, - false, + types.ErrInvalidAccountAddress, }, { "invalid version", @@ -416,7 +416,7 @@ func (suite *TypesTestSuite) TestValidateHostMetadata() { TxType: types.TxTypeSDKMultiMsg, } }, - false, + types.ErrInvalidVersion, }, } @@ -439,10 +439,10 @@ func (suite *TypesTestSuite) TestValidateHostMetadata() { metadata, ) - if tc.expPass { + if tc.expError == nil { suite.Require().NoError(err, tc.name) } else { - suite.Require().Error(err, tc.name) + suite.Require().ErrorIs(err, tc.expError) } }) }