From ec65d27bf68cf804ae9e20893e0922bc20690169 Mon Sep 17 00:00:00 2001 From: meoaka3 Date: Fri, 20 Dec 2024 19:57:31 +0700 Subject: [PATCH] fix TestGenesisAccountValidate" (#7763) Co-authored-by: Damian Nolan --- .../27-interchain-accounts/types/account_test.go | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/modules/apps/27-interchain-accounts/types/account_test.go b/modules/apps/27-interchain-accounts/types/account_test.go index 996d5b85e21..da81f1e1f85 100644 --- a/modules/apps/27-interchain-accounts/types/account_test.go +++ b/modules/apps/27-interchain-accounts/types/account_test.go @@ -120,19 +120,19 @@ func (suite *TypesTestSuite) TestGenesisAccountValidate() { ownerAddr := sdk.AccAddress(pubkey.Address()) testCases := []struct { - name string - acc authtypes.GenesisAccount - expPass bool + name string + acc authtypes.GenesisAccount + expErr error }{ { "success", types.NewInterchainAccount(baseAcc, ownerAddr.String()), - true, + nil, }, { "interchain account with empty AccountOwner field", types.NewInterchainAccount(baseAcc, ""), - false, + types.ErrInvalidAccountAddress, }, } @@ -141,10 +141,11 @@ func (suite *TypesTestSuite) TestGenesisAccountValidate() { err := tc.acc.Validate() - if tc.expPass { + if tc.expErr == nil { suite.Require().NoError(err) } else { suite.Require().Error(err) + suite.Require().ErrorIs(err, tc.expErr) } } }