From 8396e4900a0edd555d94801ed475c3db8f78557b Mon Sep 17 00:00:00 2001 From: Narangde Date: Wed, 18 Sep 2024 09:29:16 +0900 Subject: [PATCH] chore: modify path for mockgen (#121) --- .../testutil/expected_keepers_mocks.go | 4 +- .../testutil/expected_keepers_mocks.go | 42 +++---------------- scripts/mockgen.sh | 4 +- 3 files changed, 10 insertions(+), 40 deletions(-) diff --git a/client/x/evmengine/testutil/expected_keepers_mocks.go b/client/x/evmengine/testutil/expected_keepers_mocks.go index 55352c99..3d40b6cc 100644 --- a/client/x/evmengine/testutil/expected_keepers_mocks.go +++ b/client/x/evmengine/testutil/expected_keepers_mocks.go @@ -1,9 +1,9 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: client/x/evmengine/types/expected_keepers.go +// Source: ../client/x/evmengine/types/expected_keepers.go // // Generated by this command: // -// mockgen -source=client/x/evmengine/types/expected_keepers.go -package testutil -destination client/x/evmengine/testutil/expected_keepers_mocks.go +// mockgen -source=../client/x/evmengine/types/expected_keepers.go -package testutil -destination ../client/x/evmengine/testutil/expected_keepers_mocks.go // // Package testutil is a generated GoMock package. diff --git a/client/x/evmstaking/testutil/expected_keepers_mocks.go b/client/x/evmstaking/testutil/expected_keepers_mocks.go index 493cd533..33924c54 100644 --- a/client/x/evmstaking/testutil/expected_keepers_mocks.go +++ b/client/x/evmstaking/testutil/expected_keepers_mocks.go @@ -1,9 +1,9 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: client/x/evmstaking/types/expected_keepers.go +// Source: ../client/x/evmstaking/types/expected_keepers.go // // Generated by this command: // -// mockgen -source=client/x/evmstaking/types/expected_keepers.go -package testutil -destination client/x/evmstaking/testutil/expected_keepers_mocks.go +// mockgen -source=../client/x/evmstaking/types/expected_keepers.go -package testutil -destination ../client/x/evmstaking/testutil/expected_keepers_mocks.go // // Package testutil is a generated GoMock package. @@ -155,15 +155,15 @@ func (mr *MockAccountKeeperMockRecorder) SetAccount(ctx, acc any) *gomock.Call { } // SetModuleAccount mocks base method. -func (m *MockAccountKeeper) SetModuleAccount(arg0 context.Context, arg1 types0.ModuleAccountI) { +func (m *MockAccountKeeper) SetModuleAccount(ctx context.Context, modAcc types0.ModuleAccountI) { m.ctrl.T.Helper() - m.ctrl.Call(m, "SetModuleAccount", arg0, arg1) + m.ctrl.Call(m, "SetModuleAccount", ctx, modAcc) } // SetModuleAccount indicates an expected call of SetModuleAccount. -func (mr *MockAccountKeeperMockRecorder) SetModuleAccount(arg0, arg1 any) *gomock.Call { +func (mr *MockAccountKeeperMockRecorder) SetModuleAccount(ctx, modAcc any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetModuleAccount", reflect.TypeOf((*MockAccountKeeper)(nil).SetModuleAccount), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetModuleAccount", reflect.TypeOf((*MockAccountKeeper)(nil).SetModuleAccount), ctx, modAcc) } // MockBankKeeper is a mock of BankKeeper interface. @@ -409,21 +409,6 @@ func (mr *MockStakingKeeperMockRecorder) BondDenom(ctx any) *gomock.Call { return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BondDenom", reflect.TypeOf((*MockStakingKeeper)(nil).BondDenom), ctx) } -// CompleteRedelegation mocks base method. -func (m *MockStakingKeeper) CompleteRedelegation(ctx context.Context, delAddr types0.AccAddress, valSrcAddr, valDstAddr types0.ValAddress) (types0.Coins, error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "CompleteRedelegation", ctx, delAddr, valSrcAddr, valDstAddr) - ret0, _ := ret[0].(types0.Coins) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// CompleteRedelegation indicates an expected call of CompleteRedelegation. -func (mr *MockStakingKeeperMockRecorder) CompleteRedelegation(ctx, delAddr, valSrcAddr, valDstAddr any) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CompleteRedelegation", reflect.TypeOf((*MockStakingKeeper)(nil).CompleteRedelegation), ctx, delAddr, valSrcAddr, valDstAddr) -} - // DeleteUnbondingIndex mocks base method. func (m *MockStakingKeeper) DeleteUnbondingIndex(ctx context.Context, id uint64) error { m.ctrl.T.Helper() @@ -438,21 +423,6 @@ func (mr *MockStakingKeeperMockRecorder) DeleteUnbondingIndex(ctx, id any) *gomo return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteUnbondingIndex", reflect.TypeOf((*MockStakingKeeper)(nil).DeleteUnbondingIndex), ctx, id) } -// DequeueAllMatureRedelegationQueue mocks base method. -func (m *MockStakingKeeper) DequeueAllMatureRedelegationQueue(ctx context.Context, currTime time.Time) ([]types2.DVVTriplet, error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "DequeueAllMatureRedelegationQueue", ctx, currTime) - ret0, _ := ret[0].([]types2.DVVTriplet) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// DequeueAllMatureRedelegationQueue indicates an expected call of DequeueAllMatureRedelegationQueue. -func (mr *MockStakingKeeperMockRecorder) DequeueAllMatureRedelegationQueue(ctx, currTime any) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DequeueAllMatureRedelegationQueue", reflect.TypeOf((*MockStakingKeeper)(nil).DequeueAllMatureRedelegationQueue), ctx, currTime) -} - // EndBlocker mocks base method. func (m *MockStakingKeeper) EndBlocker(ctx context.Context) ([]types.ValidatorUpdate, error) { m.ctrl.T.Helper() diff --git a/scripts/mockgen.sh b/scripts/mockgen.sh index bd9ddab0..b5ca0c94 100644 --- a/scripts/mockgen.sh +++ b/scripts/mockgen.sh @@ -3,5 +3,5 @@ mockgen_cmd="mockgen" $mockgen_cmd -package mock -destination testutil/mock/grpc_server.go github.com/cosmos/gogoproto/grpc Server $mockgen_cmd -package mock -destination testutil/mock/logger.go cosmossdk.io/log Logger -$mockgen_cmd -source=client/x/evmengine/types/expected_keepers.go -package testutil -destination client/x/evmengine/testutil/expected_keepers_mocks.go -$mockgen_cmd -source=client/x/evmstaking/types/expected_keepers.go -package testutil -destination client/x/evmstaking/testutil/expected_keepers_mocks.go +$mockgen_cmd -source=../client/x/evmengine/types/expected_keepers.go -package testutil -destination ../client/x/evmengine/testutil/expected_keepers_mocks.go +$mockgen_cmd -source=../client/x/evmstaking/types/expected_keepers.go -package testutil -destination ../client/x/evmstaking/testutil/expected_keepers_mocks.go