From 59d8192f8c163e21031a7b00487ef28601780650 Mon Sep 17 00:00:00 2001 From: Karolos Antoniadis Date: Thu, 14 Sep 2023 17:14:36 +0200 Subject: [PATCH] fix mocks --- testutil/keeper/mocks.go | 48 ++++++++++------------------------------ 1 file changed, 12 insertions(+), 36 deletions(-) diff --git a/testutil/keeper/mocks.go b/testutil/keeper/mocks.go index ef310adddc..3df4110286 100644 --- a/testutil/keeper/mocks.go +++ b/testutil/keeper/mocks.go @@ -12,14 +12,13 @@ import ( types "github.com/cosmos/cosmos-sdk/types" types0 "github.com/cosmos/cosmos-sdk/x/auth/types" types1 "github.com/cosmos/cosmos-sdk/x/capability/types" - exported "github.com/cosmos/cosmos-sdk/x/evidence/exported" types2 "github.com/cosmos/cosmos-sdk/x/evidence/types" types3 "github.com/cosmos/cosmos-sdk/x/slashing/types" types4 "github.com/cosmos/cosmos-sdk/x/staking/types" types5 "github.com/cosmos/ibc-go/v4/modules/core/02-client/types" types6 "github.com/cosmos/ibc-go/v4/modules/core/03-connection/types" types7 "github.com/cosmos/ibc-go/v4/modules/core/04-channel/types" - exported0 "github.com/cosmos/ibc-go/v4/modules/core/exported" + exported "github.com/cosmos/ibc-go/v4/modules/core/exported" gomock "github.com/golang/mock/gomock" types8 "github.com/tendermint/tendermint/abci/types" ) @@ -143,6 +142,7 @@ func (m *MockStakingKeeper) GetUnbondingDelegationsFromValidator(ctx types.Conte func (mr *MockStakingKeeperMockRecorder) GetUnbondingDelegationsFromValidator(ctx, valAddr interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetUnbondingDelegationsFromValidator", reflect.TypeOf((*MockStakingKeeper)(nil).GetUnbondingDelegationsFromValidator), ctx, valAddr) +} // GetUnbondingType mocks base method. func (m *MockStakingKeeper) GetUnbondingType(ctx types.Context, id uint64) (types4.UnbondingType, bool) { @@ -410,18 +410,6 @@ func (mr *MockEvidenceKeeperMockRecorder) HandleEquivocationEvidence(ctx, eviden return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HandleEquivocationEvidence", reflect.TypeOf((*MockEvidenceKeeper)(nil).HandleEquivocationEvidence), ctx, evidence) } -// SetEvidence mocks base method. -func (m *MockEvidenceKeeper) SetEvidence(ctx types.Context, evidence exported.Evidence) { - m.ctrl.T.Helper() - m.ctrl.Call(m, "SetEvidence", ctx, evidence) -} - -// SetEvidence indicates an expected call of SetEvidence. -func (mr *MockEvidenceKeeperMockRecorder) SetEvidence(ctx, evidence interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetEvidence", reflect.TypeOf((*MockEvidenceKeeper)(nil).SetEvidence), ctx, evidence) -} - // MockSlashingKeeper is a mock of SlashingKeeper interface. type MockSlashingKeeper struct { ctrl *gomock.Controller @@ -608,7 +596,7 @@ func (mr *MockChannelKeeperMockRecorder) GetNextSequenceSend(ctx, portID, channe } // SendPacket mocks base method. -func (m *MockChannelKeeper) SendPacket(ctx types.Context, channelCap *types1.Capability, packet exported0.PacketI) error { +func (m *MockChannelKeeper) SendPacket(ctx types.Context, channelCap *types1.Capability, packet exported.PacketI) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "SendPacket", ctx, channelCap, packet) ret0, _ := ret[0].(error) @@ -622,7 +610,7 @@ func (mr *MockChannelKeeperMockRecorder) SendPacket(ctx, channelCap, packet inte } // WriteAcknowledgement mocks base method. -func (m *MockChannelKeeper) WriteAcknowledgement(ctx types.Context, chanCap *types1.Capability, packet exported0.PacketI, acknowledgement exported0.Acknowledgement) error { +func (m *MockChannelKeeper) WriteAcknowledgement(ctx types.Context, chanCap *types1.Capability, packet exported.PacketI, acknowledgement exported.Acknowledgement) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "WriteAcknowledgement", ctx, chanCap, packet, acknowledgement) ret0, _ := ret[0].(error) @@ -762,7 +750,7 @@ func (mr *MockClientKeeperMockRecorder) ClientStore(ctx, clientID interface{}) * } // CreateClient mocks base method. -func (m *MockClientKeeper) CreateClient(ctx types.Context, clientState exported0.ClientState, consensusState exported0.ConsensusState) (string, error) { +func (m *MockClientKeeper) CreateClient(ctx types.Context, clientState exported.ClientState, consensusState exported.ConsensusState) (string, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "CreateClient", ctx, clientState, consensusState) ret0, _ := ret[0].(string) @@ -792,10 +780,10 @@ func (mr *MockClientKeeperMockRecorder) GetClientConsensusState(ctx, clientID, h } // GetClientState mocks base method. -func (m *MockClientKeeper) GetClientState(ctx types.Context, clientID string) (exported0.ClientState, bool) { +func (m *MockClientKeeper) GetClientState(ctx types.Context, clientID string) (exported.ClientState, bool) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GetClientState", ctx, clientID) - ret0, _ := ret[0].(exported0.ClientState) + ret0, _ := ret[0].(exported.ClientState) ret1, _ := ret[1].(bool) return ret0, ret1 } @@ -807,10 +795,10 @@ func (mr *MockClientKeeperMockRecorder) GetClientState(ctx, clientID interface{} } // GetLatestClientConsensusState mocks base method. -func (m *MockClientKeeper) GetLatestClientConsensusState(ctx types.Context, clientID string) (exported0.ConsensusState, bool) { +func (m *MockClientKeeper) GetLatestClientConsensusState(ctx types.Context, clientID string) (exported.ConsensusState, bool) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GetLatestClientConsensusState", ctx, clientID) - ret0, _ := ret[0].(exported0.ConsensusState) + ret0, _ := ret[0].(exported.ConsensusState) ret1, _ := ret[1].(bool) return ret0, ret1 } @@ -822,10 +810,10 @@ func (mr *MockClientKeeperMockRecorder) GetLatestClientConsensusState(ctx, clien } // GetSelfConsensusState mocks base method. -func (m *MockClientKeeper) GetSelfConsensusState(ctx types.Context, height exported0.Height) (exported0.ConsensusState, error) { +func (m *MockClientKeeper) GetSelfConsensusState(ctx types.Context, height exported.Height) (exported.ConsensusState, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GetSelfConsensusState", ctx, height) - ret0, _ := ret[0].(exported0.ConsensusState) + ret0, _ := ret[0].(exported.ConsensusState) ret1, _ := ret[1].(error) return ret0, ret1 } @@ -837,7 +825,7 @@ func (mr *MockClientKeeperMockRecorder) GetSelfConsensusState(ctx, height interf } // SetClientState mocks base method. -func (m *MockClientKeeper) SetClientState(ctx types.Context, clientID string, clientState exported0.ClientState) { +func (m *MockClientKeeper) SetClientState(ctx types.Context, clientID string, clientState exported.ClientState) { m.ctrl.T.Helper() m.ctrl.Call(m, "SetClientState", ctx, clientID, clientState) } @@ -885,18 +873,6 @@ func (mr *MockDistributionKeeperMockRecorder) FundCommunityPool(ctx, amount, sen return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FundCommunityPool", reflect.TypeOf((*MockDistributionKeeper)(nil).FundCommunityPool), ctx, amount, sender) } -// SetClientState mocks base method. -func (m *MockClientKeeper) SetClientState(ctx types.Context, clientID string, clientState exported.ClientState) { - m.ctrl.T.Helper() - m.ctrl.Call(m, "SetClientState", ctx, clientID, clientState) -} - -// SetClientState indicates an expected call of SetClientState. -func (mr *MockClientKeeperMockRecorder) SetClientState(ctx, clientID, clientState interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetClientState", reflect.TypeOf((*MockClientKeeper)(nil).SetClientState), ctx, clientID, clientState) -} - // MockConsumerHooks is a mock of ConsumerHooks interface. type MockConsumerHooks struct { ctrl *gomock.Controller