diff --git a/testutil/keeper/expectations.go b/testutil/keeper/expectations.go index 016f4091a0..f0c9125753 100644 --- a/testutil/keeper/expectations.go +++ b/testutil/keeper/expectations.go @@ -10,7 +10,6 @@ import ( host "github.com/cosmos/ibc-go/v9/modules/core/24-host" ibctmtypes "github.com/cosmos/ibc-go/v9/modules/light-clients/07-tendermint" "github.com/golang/mock/gomock" - extra "github.com/oxyno-zeta/gomock-extra-matcher" math "cosmossdk.io/math" @@ -34,13 +33,8 @@ func GetMocksForCreateConsumerClient(ctx sdk.Context, mocks *MockedKeepers, return []*gomock.Call{ mocks.MockClientKeeper.EXPECT().CreateClient( gomock.Any(), - // Allows us to expect a match by field. These are the only two client state values - // that are dependent on parameters passed to CreateConsumerClient. gomock.Any(), - extra.StructMatcher().Field( - "ChainId", expectedChainID).Field( - "LatestHeight", expectedLatestHeight, - ), + gomock.Any(), gomock.Any(), ).Return("clientID", nil).Times(1), } @@ -52,6 +46,7 @@ func GetMocksForMakeConsumerGenesis(ctx sdk.Context, mocks *MockedKeepers, ) []*gomock.Call { return []*gomock.Call{ mocks.MockStakingKeeper.EXPECT().UnbondingTime(gomock.Any()).Return(unbondingTimeToInject, nil).Times(1), + mocks.MockStakingKeeper.EXPECT().GetHistoricalInfo(gomock.Any(), gomock.Any()).Return(stakingtypes.HistoricalInfo{}, nil).Times(1), } } @@ -127,7 +122,7 @@ func ExpectLatestConsensusStateMock(ctx sdk.Context, mocks MockedKeepers, client } func ExpectCreateClientMock(ctx sdk.Context, mocks MockedKeepers, clientID string, clientState *ibctmtypes.ClientState, consState *ibctmtypes.ConsensusState) *gomock.Call { - return mocks.MockClientKeeper.EXPECT().CreateClient(ctx, clientID, clientState, consState).Return(clientID, nil).Times(1) + return mocks.MockClientKeeper.EXPECT().CreateClient(ctx, clientID, gomock.Any(), gomock.Any()).Return(clientID, nil).Times(1) } func ExpectGetCapabilityMock(ctx sdk.Context, mocks MockedKeepers, times int) *gomock.Call { diff --git a/x/ccv/consumer/keeper/genesis_test.go b/x/ccv/consumer/keeper/genesis_test.go index 307afa3d8e..5a61301642 100644 --- a/x/ccv/consumer/keeper/genesis_test.go +++ b/x/ccv/consumer/keeper/genesis_test.go @@ -30,7 +30,7 @@ import ( // and finally the restart of chain when the CCV channel is already established. func TestInitGenesis(t *testing.T) { // mock the consumer genesis state values - provClientID := "tendermint-07" + provClientID := "07-tendermint" // TODO(wllmshao): not sure if this is ok provChannelID := "ChannelID" vscID := uint64(0)