diff --git a/Makefile b/Makefile index 89536925..904aef8e 100644 --- a/Makefile +++ b/Makefile @@ -136,7 +136,7 @@ EXCLUDED_UNIT_PACKAGES=$(shell go list ./... | grep -v tests | grep -v testutil mocks: @echo "--> Installing mockgen" - go install github.com/golang/mock/mockgen@v1.6.0 + go install go.uber.org/mock/mockgen@v0.6.0 @echo "--> Generating mocks" @./scripts/mockgen.sh diff --git a/go.mod b/go.mod index c85fe3e3..4152341b 100644 --- a/go.mod +++ b/go.mod @@ -26,7 +26,6 @@ require ( github.com/cosmos/ibc-go/modules/capability v1.0.1 github.com/cosmos/ibc-go/v10 v10.3.1-0.20250909102629-ed3b125c7b6f github.com/ethereum/go-ethereum v1.15.11 - github.com/golang/mock v1.6.0 github.com/golang/protobuf v1.5.4 github.com/gorilla/mux v1.8.1 github.com/grpc-ecosystem/grpc-gateway v1.16.0 @@ -35,6 +34,7 @@ require ( github.com/spf13/cobra v1.10.1 github.com/spf13/pflag v1.0.10 github.com/stretchr/testify v1.11.1 + go.uber.org/mock v0.6.0 google.golang.org/genproto/googleapis/api v0.0.0-20250707201910-8d1bb00bc6a7 google.golang.org/grpc v1.75.0 google.golang.org/protobuf v1.36.10 @@ -250,7 +250,6 @@ require ( go.opentelemetry.io/otel/sdk v1.37.0 // indirect go.opentelemetry.io/otel/sdk/metric v1.37.0 // indirect go.opentelemetry.io/otel/trace v1.37.0 // indirect - go.uber.org/mock v0.6.0 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.27.0 // indirect go.yaml.in/yaml/v2 v2.4.2 // indirect diff --git a/x/poa/ante/poa_test.go b/x/poa/ante/poa_test.go index 66faec3b..2f18ae5d 100644 --- a/x/poa/ante/poa_test.go +++ b/x/poa/ante/poa_test.go @@ -11,10 +11,10 @@ import ( sdktestutil "github.com/cosmos/cosmos-sdk/testutil" sdk "github.com/cosmos/cosmos-sdk/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/require" "github.com/xrplevm/node/v10/x/poa/testutil" "github.com/xrplevm/node/v10/x/poa/types" + "go.uber.org/mock/gomock" ) func setupPoaDecorator(t *testing.T) ( diff --git a/x/poa/keeper/common_test.go b/x/poa/keeper/common_test.go index 0a7c3369..63d4142d 100644 --- a/x/poa/keeper/common_test.go +++ b/x/poa/keeper/common_test.go @@ -12,9 +12,9 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" - "github.com/golang/mock/gomock" "github.com/xrplevm/node/v10/x/poa/testutil" "github.com/xrplevm/node/v10/x/poa/types" + "go.uber.org/mock/gomock" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" ) diff --git a/x/poa/keeper/keeper_test.go b/x/poa/keeper/keeper_test.go index 90103974..b0c38069 100644 --- a/x/poa/keeper/keeper_test.go +++ b/x/poa/keeper/keeper_test.go @@ -8,10 +8,10 @@ import ( types1 "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/require" "github.com/xrplevm/node/v10/x/poa/testutil" "github.com/xrplevm/node/v10/x/poa/types" + "go.uber.org/mock/gomock" ) func poaKeeperTestSetup(t *testing.T) (*Keeper, sdk.Context) { diff --git a/x/poa/keeper/msg_server_add_validator_test.go b/x/poa/keeper/msg_server_add_validator_test.go index 653b795f..08aaa841 100644 --- a/x/poa/keeper/msg_server_add_validator_test.go +++ b/x/poa/keeper/msg_server_add_validator_test.go @@ -7,10 +7,10 @@ import ( types1 "github.com/cosmos/cosmos-sdk/codec/types" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/require" "github.com/xrplevm/node/v10/x/poa/testutil" "github.com/xrplevm/node/v10/x/poa/types" + "go.uber.org/mock/gomock" ) func TestMsgServer_AddValidator(t *testing.T) { diff --git a/x/poa/testutil/expected_keepers_mock.go b/x/poa/testutil/expected_keepers_mock.go index 203a15cd..8ebf6abd 100644 --- a/x/poa/testutil/expected_keepers_mock.go +++ b/x/poa/testutil/expected_keepers_mock.go @@ -1,5 +1,10 @@ // Code generated by MockGen. DO NOT EDIT. // Source: x/poa/types/expected_keepers.go +// +// Generated by this command: +// +// mockgen -source=x/poa/types/expected_keepers.go -package testutil -destination=x/poa/testutil/expected_keepers_mock.go +// // Package testutil is a generated GoMock package. package testutil @@ -13,13 +18,14 @@ import ( v1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" types0 "github.com/cosmos/cosmos-sdk/x/slashing/types" types1 "github.com/cosmos/cosmos-sdk/x/staking/types" - gomock "github.com/golang/mock/gomock" + gomock "go.uber.org/mock/gomock" ) // MockAccountKeeper is a mock of AccountKeeper interface. type MockAccountKeeper struct { ctrl *gomock.Controller recorder *MockAccountKeeperMockRecorder + isgomock struct{} } // MockAccountKeeperMockRecorder is the mock recorder for MockAccountKeeper. @@ -48,7 +54,7 @@ func (m *MockAccountKeeper) GetAccount(ctx context.Context, addr types.AccAddres } // GetAccount indicates an expected call of GetAccount. -func (mr *MockAccountKeeperMockRecorder) GetAccount(ctx, addr interface{}) *gomock.Call { +func (mr *MockAccountKeeperMockRecorder) GetAccount(ctx, addr any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAccount", reflect.TypeOf((*MockAccountKeeper)(nil).GetAccount), ctx, addr) } @@ -62,7 +68,7 @@ func (m *MockAccountKeeper) GetModuleAccount(ctx context.Context, moduleName str } // GetModuleAccount indicates an expected call of GetModuleAccount. -func (mr *MockAccountKeeperMockRecorder) GetModuleAccount(ctx, moduleName interface{}) *gomock.Call { +func (mr *MockAccountKeeperMockRecorder) GetModuleAccount(ctx, moduleName any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetModuleAccount", reflect.TypeOf((*MockAccountKeeper)(nil).GetModuleAccount), ctx, moduleName) } @@ -71,6 +77,7 @@ func (mr *MockAccountKeeperMockRecorder) GetModuleAccount(ctx, moduleName interf type MockBankKeeper struct { ctrl *gomock.Controller recorder *MockBankKeeperMockRecorder + isgomock struct{} } // MockBankKeeperMockRecorder is the mock recorder for MockBankKeeper. @@ -99,7 +106,7 @@ func (m *MockBankKeeper) BurnCoins(ctx context.Context, moduleName string, amt t } // BurnCoins indicates an expected call of BurnCoins. -func (mr *MockBankKeeperMockRecorder) BurnCoins(ctx, moduleName, amt interface{}) *gomock.Call { +func (mr *MockBankKeeperMockRecorder) BurnCoins(ctx, moduleName, amt any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BurnCoins", reflect.TypeOf((*MockBankKeeper)(nil).BurnCoins), ctx, moduleName, amt) } @@ -113,7 +120,7 @@ func (m *MockBankKeeper) GetBalance(ctx context.Context, addr types.AccAddress, } // GetBalance indicates an expected call of GetBalance. -func (mr *MockBankKeeperMockRecorder) GetBalance(ctx, addr, denom interface{}) *gomock.Call { +func (mr *MockBankKeeperMockRecorder) GetBalance(ctx, addr, denom any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBalance", reflect.TypeOf((*MockBankKeeper)(nil).GetBalance), ctx, addr, denom) } @@ -125,7 +132,7 @@ func (m *MockBankKeeper) IterateAllBalances(ctx context.Context, cb func(types.A } // IterateAllBalances indicates an expected call of IterateAllBalances. -func (mr *MockBankKeeperMockRecorder) IterateAllBalances(ctx, cb interface{}) *gomock.Call { +func (mr *MockBankKeeperMockRecorder) IterateAllBalances(ctx, cb any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IterateAllBalances", reflect.TypeOf((*MockBankKeeper)(nil).IterateAllBalances), ctx, cb) } @@ -139,7 +146,7 @@ func (m *MockBankKeeper) MintCoins(ctx context.Context, moduleName string, amt t } // MintCoins indicates an expected call of MintCoins. -func (mr *MockBankKeeperMockRecorder) MintCoins(ctx, moduleName, amt interface{}) *gomock.Call { +func (mr *MockBankKeeperMockRecorder) MintCoins(ctx, moduleName, amt any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MintCoins", reflect.TypeOf((*MockBankKeeper)(nil).MintCoins), ctx, moduleName, amt) } @@ -153,7 +160,7 @@ func (m *MockBankKeeper) SendCoinsFromAccountToModule(ctx context.Context, sende } // SendCoinsFromAccountToModule indicates an expected call of SendCoinsFromAccountToModule. -func (mr *MockBankKeeperMockRecorder) SendCoinsFromAccountToModule(ctx, senderAddr, recipientModule, amt interface{}) *gomock.Call { +func (mr *MockBankKeeperMockRecorder) SendCoinsFromAccountToModule(ctx, senderAddr, recipientModule, amt any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendCoinsFromAccountToModule", reflect.TypeOf((*MockBankKeeper)(nil).SendCoinsFromAccountToModule), ctx, senderAddr, recipientModule, amt) } @@ -167,7 +174,7 @@ func (m *MockBankKeeper) SendCoinsFromModuleToAccount(ctx context.Context, sende } // SendCoinsFromModuleToAccount indicates an expected call of SendCoinsFromModuleToAccount. -func (mr *MockBankKeeperMockRecorder) SendCoinsFromModuleToAccount(ctx, senderModule, recipientAddr, amt interface{}) *gomock.Call { +func (mr *MockBankKeeperMockRecorder) SendCoinsFromModuleToAccount(ctx, senderModule, recipientAddr, amt any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendCoinsFromModuleToAccount", reflect.TypeOf((*MockBankKeeper)(nil).SendCoinsFromModuleToAccount), ctx, senderModule, recipientAddr, amt) } @@ -181,7 +188,7 @@ func (m *MockBankKeeper) SpendableCoins(ctx context.Context, addr types.AccAddre } // SpendableCoins indicates an expected call of SpendableCoins. -func (mr *MockBankKeeperMockRecorder) SpendableCoins(ctx, addr interface{}) *gomock.Call { +func (mr *MockBankKeeperMockRecorder) SpendableCoins(ctx, addr any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SpendableCoins", reflect.TypeOf((*MockBankKeeper)(nil).SpendableCoins), ctx, addr) } @@ -190,6 +197,7 @@ func (mr *MockBankKeeperMockRecorder) SpendableCoins(ctx, addr interface{}) *gom type MockStakingKeeper struct { ctrl *gomock.Controller recorder *MockStakingKeeperMockRecorder + isgomock struct{} } // MockStakingKeeperMockRecorder is the mock recorder for MockStakingKeeper. @@ -219,7 +227,7 @@ func (m *MockStakingKeeper) BondDenom(ctx context.Context) (string, error) { } // BondDenom indicates an expected call of BondDenom. -func (mr *MockStakingKeeperMockRecorder) BondDenom(ctx interface{}) *gomock.Call { +func (mr *MockStakingKeeperMockRecorder) BondDenom(ctx any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BondDenom", reflect.TypeOf((*MockStakingKeeper)(nil).BondDenom), ctx) } @@ -234,7 +242,7 @@ func (m *MockStakingKeeper) GetAllDelegations(ctx context.Context) ([]types1.Del } // GetAllDelegations indicates an expected call of GetAllDelegations. -func (mr *MockStakingKeeperMockRecorder) GetAllDelegations(ctx interface{}) *gomock.Call { +func (mr *MockStakingKeeperMockRecorder) GetAllDelegations(ctx any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAllDelegations", reflect.TypeOf((*MockStakingKeeper)(nil).GetAllDelegations), ctx) } @@ -249,7 +257,7 @@ func (m *MockStakingKeeper) GetAllDelegatorDelegations(ctx context.Context, dele } // GetAllDelegatorDelegations indicates an expected call of GetAllDelegatorDelegations. -func (mr *MockStakingKeeperMockRecorder) GetAllDelegatorDelegations(ctx, delegator interface{}) *gomock.Call { +func (mr *MockStakingKeeperMockRecorder) GetAllDelegatorDelegations(ctx, delegator any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAllDelegatorDelegations", reflect.TypeOf((*MockStakingKeeper)(nil).GetAllDelegatorDelegations), ctx, delegator) } @@ -264,7 +272,7 @@ func (m *MockStakingKeeper) GetAllValidators(ctx context.Context) ([]types1.Vali } // GetAllValidators indicates an expected call of GetAllValidators. -func (mr *MockStakingKeeperMockRecorder) GetAllValidators(ctx interface{}) *gomock.Call { +func (mr *MockStakingKeeperMockRecorder) GetAllValidators(ctx any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAllValidators", reflect.TypeOf((*MockStakingKeeper)(nil).GetAllValidators), ctx) } @@ -279,7 +287,7 @@ func (m *MockStakingKeeper) GetParams(ctx context.Context) (types1.Params, error } // GetParams indicates an expected call of GetParams. -func (mr *MockStakingKeeperMockRecorder) GetParams(ctx interface{}) *gomock.Call { +func (mr *MockStakingKeeperMockRecorder) GetParams(ctx any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetParams", reflect.TypeOf((*MockStakingKeeper)(nil).GetParams), ctx) } @@ -294,7 +302,7 @@ func (m *MockStakingKeeper) GetUnbondingDelegationsFromValidator(ctx context.Con } // GetUnbondingDelegationsFromValidator indicates an expected call of GetUnbondingDelegationsFromValidator. -func (mr *MockStakingKeeperMockRecorder) GetUnbondingDelegationsFromValidator(ctx, validator interface{}) *gomock.Call { +func (mr *MockStakingKeeperMockRecorder) GetUnbondingDelegationsFromValidator(ctx, validator any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetUnbondingDelegationsFromValidator", reflect.TypeOf((*MockStakingKeeper)(nil).GetUnbondingDelegationsFromValidator), ctx, validator) } @@ -309,7 +317,7 @@ func (m *MockStakingKeeper) GetValidator(ctx context.Context, addr types.ValAddr } // GetValidator indicates an expected call of GetValidator. -func (mr *MockStakingKeeperMockRecorder) GetValidator(ctx, addr interface{}) *gomock.Call { +func (mr *MockStakingKeeperMockRecorder) GetValidator(ctx, addr any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetValidator", reflect.TypeOf((*MockStakingKeeper)(nil).GetValidator), ctx, addr) } @@ -324,7 +332,7 @@ func (m *MockStakingKeeper) GetValidators(ctx context.Context, maxRetrieve uint3 } // GetValidators indicates an expected call of GetValidators. -func (mr *MockStakingKeeperMockRecorder) GetValidators(ctx, maxRetrieve interface{}) *gomock.Call { +func (mr *MockStakingKeeperMockRecorder) GetValidators(ctx, maxRetrieve any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetValidators", reflect.TypeOf((*MockStakingKeeper)(nil).GetValidators), ctx, maxRetrieve) } @@ -352,7 +360,7 @@ func (m *MockStakingKeeper) RemoveDelegation(ctx context.Context, delegation typ } // RemoveDelegation indicates an expected call of RemoveDelegation. -func (mr *MockStakingKeeperMockRecorder) RemoveDelegation(ctx, delegation interface{}) *gomock.Call { +func (mr *MockStakingKeeperMockRecorder) RemoveDelegation(ctx, delegation any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveDelegation", reflect.TypeOf((*MockStakingKeeper)(nil).RemoveDelegation), ctx, delegation) } @@ -367,7 +375,7 @@ func (m *MockStakingKeeper) RemoveValidatorTokens(ctx context.Context, validator } // RemoveValidatorTokens indicates an expected call of RemoveValidatorTokens. -func (mr *MockStakingKeeperMockRecorder) RemoveValidatorTokens(ctx, validator, tokensToRemove interface{}) *gomock.Call { +func (mr *MockStakingKeeperMockRecorder) RemoveValidatorTokens(ctx, validator, tokensToRemove any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveValidatorTokens", reflect.TypeOf((*MockStakingKeeper)(nil).RemoveValidatorTokens), ctx, validator, tokensToRemove) } @@ -383,7 +391,7 @@ func (m *MockStakingKeeper) RemoveValidatorTokensAndShares(ctx context.Context, } // RemoveValidatorTokensAndShares indicates an expected call of RemoveValidatorTokensAndShares. -func (mr *MockStakingKeeperMockRecorder) RemoveValidatorTokensAndShares(ctx, validator, sharesToRemove interface{}) *gomock.Call { +func (mr *MockStakingKeeperMockRecorder) RemoveValidatorTokensAndShares(ctx, validator, sharesToRemove any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveValidatorTokensAndShares", reflect.TypeOf((*MockStakingKeeper)(nil).RemoveValidatorTokensAndShares), ctx, validator, sharesToRemove) } @@ -398,7 +406,7 @@ func (m *MockStakingKeeper) SlashUnbondingDelegation(ctx context.Context, ubd ty } // SlashUnbondingDelegation indicates an expected call of SlashUnbondingDelegation. -func (mr *MockStakingKeeperMockRecorder) SlashUnbondingDelegation(ctx, ubd, infractionHeight, slashFactor interface{}) *gomock.Call { +func (mr *MockStakingKeeperMockRecorder) SlashUnbondingDelegation(ctx, ubd, infractionHeight, slashFactor any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SlashUnbondingDelegation", reflect.TypeOf((*MockStakingKeeper)(nil).SlashUnbondingDelegation), ctx, ubd, infractionHeight, slashFactor) } @@ -413,7 +421,7 @@ func (m *MockStakingKeeper) Unbond(ctx context.Context, delAddr types.AccAddress } // Unbond indicates an expected call of Unbond. -func (mr *MockStakingKeeperMockRecorder) Unbond(ctx, delAddr, valAddr, shares interface{}) *gomock.Call { +func (mr *MockStakingKeeperMockRecorder) Unbond(ctx, delAddr, valAddr, shares any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Unbond", reflect.TypeOf((*MockStakingKeeper)(nil).Unbond), ctx, delAddr, valAddr, shares) } @@ -422,6 +430,7 @@ func (mr *MockStakingKeeperMockRecorder) Unbond(ctx, delAddr, valAddr, shares in type MockSlashingKeeper struct { ctrl *gomock.Controller recorder *MockSlashingKeeperMockRecorder + isgomock struct{} } // MockSlashingKeeperMockRecorder is the mock recorder for MockSlashingKeeper. @@ -451,7 +460,7 @@ func (m *MockSlashingKeeper) GetParams(ctx context.Context) (types0.Params, erro } // GetParams indicates an expected call of GetParams. -func (mr *MockSlashingKeeperMockRecorder) GetParams(ctx interface{}) *gomock.Call { +func (mr *MockSlashingKeeperMockRecorder) GetParams(ctx any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetParams", reflect.TypeOf((*MockSlashingKeeper)(nil).GetParams), ctx) } @@ -460,6 +469,7 @@ func (mr *MockSlashingKeeperMockRecorder) GetParams(ctx interface{}) *gomock.Cal type MockGovKeeper struct { ctrl *gomock.Controller recorder *MockGovKeeperMockRecorder + isgomock struct{} } // MockGovKeeperMockRecorder is the mock recorder for MockGovKeeper. @@ -489,7 +499,7 @@ func (m *MockGovKeeper) SubmitProposal(ctx context.Context, messages []types.Msg } // SubmitProposal indicates an expected call of SubmitProposal. -func (mr *MockGovKeeperMockRecorder) SubmitProposal(ctx, messages, metadata interface{}) *gomock.Call { +func (mr *MockGovKeeperMockRecorder) SubmitProposal(ctx, messages, metadata any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SubmitProposal", reflect.TypeOf((*MockGovKeeper)(nil).SubmitProposal), ctx, messages, metadata) } diff --git a/x/poa/testutil/expected_msg_server_mock.go b/x/poa/testutil/expected_msg_server_mock.go index 628586c4..0db5c9aa 100644 --- a/x/poa/testutil/expected_msg_server_mock.go +++ b/x/poa/testutil/expected_msg_server_mock.go @@ -1,5 +1,10 @@ // Code generated by MockGen. DO NOT EDIT. // Source: x/poa/testutil/expected_msg_server.go +// +// Generated by this command: +// +// mockgen -source=x/poa/testutil/expected_msg_server.go -package testutil -destination=x/poa/testutil/expected_msg_server_mock.go +// // Package testutil is a generated GoMock package. package testutil @@ -9,13 +14,14 @@ import ( reflect "reflect" types "github.com/cosmos/cosmos-sdk/x/staking/types" - gomock "github.com/golang/mock/gomock" + gomock "go.uber.org/mock/gomock" ) // MockStakingMsgServer is a mock of StakingMsgServer interface. type MockStakingMsgServer struct { ctrl *gomock.Controller recorder *MockStakingMsgServerMockRecorder + isgomock struct{} } // MockStakingMsgServerMockRecorder is the mock recorder for MockStakingMsgServer. @@ -45,7 +51,7 @@ func (m *MockStakingMsgServer) BeginRedelegate(arg0 context.Context, arg1 *types } // BeginRedelegate indicates an expected call of BeginRedelegate. -func (mr *MockStakingMsgServerMockRecorder) BeginRedelegate(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockStakingMsgServerMockRecorder) BeginRedelegate(arg0, arg1 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BeginRedelegate", reflect.TypeOf((*MockStakingMsgServer)(nil).BeginRedelegate), arg0, arg1) } @@ -60,7 +66,7 @@ func (m *MockStakingMsgServer) CancelUnbondingDelegation(arg0 context.Context, a } // CancelUnbondingDelegation indicates an expected call of CancelUnbondingDelegation. -func (mr *MockStakingMsgServerMockRecorder) CancelUnbondingDelegation(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockStakingMsgServerMockRecorder) CancelUnbondingDelegation(arg0, arg1 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CancelUnbondingDelegation", reflect.TypeOf((*MockStakingMsgServer)(nil).CancelUnbondingDelegation), arg0, arg1) } @@ -75,7 +81,7 @@ func (m *MockStakingMsgServer) CreateValidator(arg0 context.Context, arg1 *types } // CreateValidator indicates an expected call of CreateValidator. -func (mr *MockStakingMsgServerMockRecorder) CreateValidator(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockStakingMsgServerMockRecorder) CreateValidator(arg0, arg1 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateValidator", reflect.TypeOf((*MockStakingMsgServer)(nil).CreateValidator), arg0, arg1) } @@ -90,7 +96,7 @@ func (m *MockStakingMsgServer) Delegate(arg0 context.Context, arg1 *types.MsgDel } // Delegate indicates an expected call of Delegate. -func (mr *MockStakingMsgServerMockRecorder) Delegate(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockStakingMsgServerMockRecorder) Delegate(arg0, arg1 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delegate", reflect.TypeOf((*MockStakingMsgServer)(nil).Delegate), arg0, arg1) } @@ -105,7 +111,7 @@ func (m *MockStakingMsgServer) EditValidator(arg0 context.Context, arg1 *types.M } // EditValidator indicates an expected call of EditValidator. -func (mr *MockStakingMsgServerMockRecorder) EditValidator(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockStakingMsgServerMockRecorder) EditValidator(arg0, arg1 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EditValidator", reflect.TypeOf((*MockStakingMsgServer)(nil).EditValidator), arg0, arg1) } @@ -120,7 +126,7 @@ func (m *MockStakingMsgServer) Undelegate(arg0 context.Context, arg1 *types.MsgU } // Undelegate indicates an expected call of Undelegate. -func (mr *MockStakingMsgServerMockRecorder) Undelegate(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockStakingMsgServerMockRecorder) Undelegate(arg0, arg1 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Undelegate", reflect.TypeOf((*MockStakingMsgServer)(nil).Undelegate), arg0, arg1) } @@ -135,7 +141,7 @@ func (m *MockStakingMsgServer) UpdateParams(arg0 context.Context, arg1 *types.Ms } // UpdateParams indicates an expected call of UpdateParams. -func (mr *MockStakingMsgServerMockRecorder) UpdateParams(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockStakingMsgServerMockRecorder) UpdateParams(arg0, arg1 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateParams", reflect.TypeOf((*MockStakingMsgServer)(nil).UpdateParams), arg0, arg1) } diff --git a/x/poa/testutil/keys_mock.go b/x/poa/testutil/keys_mock.go index a51a0b58..85be68de 100644 --- a/x/poa/testutil/keys_mock.go +++ b/x/poa/testutil/keys_mock.go @@ -1,5 +1,10 @@ // Code generated by MockGen. DO NOT EDIT. // Source: x/poa/testutil/keys.go +// +// Generated by this command: +// +// mockgen -source=x/poa/testutil/keys.go -package testutil -destination=x/poa/testutil/keys_mock.go +// // Package testutil is a generated GoMock package. package testutil @@ -8,13 +13,14 @@ import ( reflect "reflect" types "github.com/cosmos/cosmos-sdk/crypto/types" - gomock "github.com/golang/mock/gomock" + gomock "go.uber.org/mock/gomock" ) // MockPubKey is a mock of PubKey interface. type MockPubKey struct { ctrl *gomock.Controller recorder *MockPubKeyMockRecorder + isgomock struct{} } // MockPubKeyMockRecorder is the mock recorder for MockPubKey. @@ -71,7 +77,7 @@ func (m *MockPubKey) Equals(arg0 types.PubKey) bool { } // Equals indicates an expected call of Equals. -func (mr *MockPubKeyMockRecorder) Equals(arg0 interface{}) *gomock.Call { +func (mr *MockPubKeyMockRecorder) Equals(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Equals", reflect.TypeOf((*MockPubKey)(nil).Equals), arg0) } @@ -137,7 +143,7 @@ func (m *MockPubKey) VerifySignature(msg, sig []byte) bool { } // VerifySignature indicates an expected call of VerifySignature. -func (mr *MockPubKeyMockRecorder) VerifySignature(msg, sig interface{}) *gomock.Call { +func (mr *MockPubKeyMockRecorder) VerifySignature(msg, sig any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "VerifySignature", reflect.TypeOf((*MockPubKey)(nil).VerifySignature), msg, sig) } diff --git a/x/poa/testutil/staking_hooks_mock.go b/x/poa/testutil/staking_hooks_mock.go index 2a4cdf9e..17155dbc 100644 --- a/x/poa/testutil/staking_hooks_mock.go +++ b/x/poa/testutil/staking_hooks_mock.go @@ -1,5 +1,10 @@ // Code generated by MockGen. DO NOT EDIT. // Source: x/poa/testutil/staking_hooks.go +// +// Generated by this command: +// +// mockgen -source=x/poa/testutil/staking_hooks.go -package testutil -destination=x/poa/testutil/staking_hooks_mock.go +// // Package testutil is a generated GoMock package. package testutil @@ -10,13 +15,14 @@ import ( math "cosmossdk.io/math" types "github.com/cosmos/cosmos-sdk/types" - gomock "github.com/golang/mock/gomock" + gomock "go.uber.org/mock/gomock" ) // MockStakingHooks is a mock of StakingHooks interface. type MockStakingHooks struct { ctrl *gomock.Controller recorder *MockStakingHooksMockRecorder + isgomock struct{} } // MockStakingHooksMockRecorder is the mock recorder for MockStakingHooks. @@ -45,7 +51,7 @@ func (m *MockStakingHooks) AfterDelegationModified(ctx context.Context, delAddr } // AfterDelegationModified indicates an expected call of AfterDelegationModified. -func (mr *MockStakingHooksMockRecorder) AfterDelegationModified(ctx, delAddr, valAddr interface{}) *gomock.Call { +func (mr *MockStakingHooksMockRecorder) AfterDelegationModified(ctx, delAddr, valAddr any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AfterDelegationModified", reflect.TypeOf((*MockStakingHooks)(nil).AfterDelegationModified), ctx, delAddr, valAddr) } @@ -59,7 +65,7 @@ func (m *MockStakingHooks) AfterUnbondingInitiated(ctx context.Context, id uint6 } // AfterUnbondingInitiated indicates an expected call of AfterUnbondingInitiated. -func (mr *MockStakingHooksMockRecorder) AfterUnbondingInitiated(ctx, id interface{}) *gomock.Call { +func (mr *MockStakingHooksMockRecorder) AfterUnbondingInitiated(ctx, id any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AfterUnbondingInitiated", reflect.TypeOf((*MockStakingHooks)(nil).AfterUnbondingInitiated), ctx, id) } @@ -73,7 +79,7 @@ func (m *MockStakingHooks) AfterValidatorBeginUnbonding(ctx context.Context, con } // AfterValidatorBeginUnbonding indicates an expected call of AfterValidatorBeginUnbonding. -func (mr *MockStakingHooksMockRecorder) AfterValidatorBeginUnbonding(ctx, consAddr, valAddr interface{}) *gomock.Call { +func (mr *MockStakingHooksMockRecorder) AfterValidatorBeginUnbonding(ctx, consAddr, valAddr any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AfterValidatorBeginUnbonding", reflect.TypeOf((*MockStakingHooks)(nil).AfterValidatorBeginUnbonding), ctx, consAddr, valAddr) } @@ -87,7 +93,7 @@ func (m *MockStakingHooks) AfterValidatorBonded(ctx context.Context, consAddr ty } // AfterValidatorBonded indicates an expected call of AfterValidatorBonded. -func (mr *MockStakingHooksMockRecorder) AfterValidatorBonded(ctx, consAddr, valAddr interface{}) *gomock.Call { +func (mr *MockStakingHooksMockRecorder) AfterValidatorBonded(ctx, consAddr, valAddr any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AfterValidatorBonded", reflect.TypeOf((*MockStakingHooks)(nil).AfterValidatorBonded), ctx, consAddr, valAddr) } @@ -101,7 +107,7 @@ func (m *MockStakingHooks) AfterValidatorCreated(ctx context.Context, valAddr ty } // AfterValidatorCreated indicates an expected call of AfterValidatorCreated. -func (mr *MockStakingHooksMockRecorder) AfterValidatorCreated(ctx, valAddr interface{}) *gomock.Call { +func (mr *MockStakingHooksMockRecorder) AfterValidatorCreated(ctx, valAddr any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AfterValidatorCreated", reflect.TypeOf((*MockStakingHooks)(nil).AfterValidatorCreated), ctx, valAddr) } @@ -115,7 +121,7 @@ func (m *MockStakingHooks) AfterValidatorRemoved(ctx context.Context, consAddr t } // AfterValidatorRemoved indicates an expected call of AfterValidatorRemoved. -func (mr *MockStakingHooksMockRecorder) AfterValidatorRemoved(ctx, consAddr, valAddr interface{}) *gomock.Call { +func (mr *MockStakingHooksMockRecorder) AfterValidatorRemoved(ctx, consAddr, valAddr any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AfterValidatorRemoved", reflect.TypeOf((*MockStakingHooks)(nil).AfterValidatorRemoved), ctx, consAddr, valAddr) } @@ -129,7 +135,7 @@ func (m *MockStakingHooks) BeforeDelegationCreated(ctx context.Context, delAddr } // BeforeDelegationCreated indicates an expected call of BeforeDelegationCreated. -func (mr *MockStakingHooksMockRecorder) BeforeDelegationCreated(ctx, delAddr, valAddr interface{}) *gomock.Call { +func (mr *MockStakingHooksMockRecorder) BeforeDelegationCreated(ctx, delAddr, valAddr any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BeforeDelegationCreated", reflect.TypeOf((*MockStakingHooks)(nil).BeforeDelegationCreated), ctx, delAddr, valAddr) } @@ -143,7 +149,7 @@ func (m *MockStakingHooks) BeforeDelegationRemoved(ctx context.Context, delAddr } // BeforeDelegationRemoved indicates an expected call of BeforeDelegationRemoved. -func (mr *MockStakingHooksMockRecorder) BeforeDelegationRemoved(ctx, delAddr, valAddr interface{}) *gomock.Call { +func (mr *MockStakingHooksMockRecorder) BeforeDelegationRemoved(ctx, delAddr, valAddr any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BeforeDelegationRemoved", reflect.TypeOf((*MockStakingHooks)(nil).BeforeDelegationRemoved), ctx, delAddr, valAddr) } @@ -157,7 +163,7 @@ func (m *MockStakingHooks) BeforeDelegationSharesModified(ctx context.Context, d } // BeforeDelegationSharesModified indicates an expected call of BeforeDelegationSharesModified. -func (mr *MockStakingHooksMockRecorder) BeforeDelegationSharesModified(ctx, delAddr, valAddr interface{}) *gomock.Call { +func (mr *MockStakingHooksMockRecorder) BeforeDelegationSharesModified(ctx, delAddr, valAddr any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BeforeDelegationSharesModified", reflect.TypeOf((*MockStakingHooks)(nil).BeforeDelegationSharesModified), ctx, delAddr, valAddr) } @@ -171,7 +177,7 @@ func (m *MockStakingHooks) BeforeValidatorModified(ctx context.Context, valAddr } // BeforeValidatorModified indicates an expected call of BeforeValidatorModified. -func (mr *MockStakingHooksMockRecorder) BeforeValidatorModified(ctx, valAddr interface{}) *gomock.Call { +func (mr *MockStakingHooksMockRecorder) BeforeValidatorModified(ctx, valAddr any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BeforeValidatorModified", reflect.TypeOf((*MockStakingHooks)(nil).BeforeValidatorModified), ctx, valAddr) } @@ -185,7 +191,7 @@ func (m *MockStakingHooks) BeforeValidatorSlashed(ctx context.Context, valAddr t } // BeforeValidatorSlashed indicates an expected call of BeforeValidatorSlashed. -func (mr *MockStakingHooksMockRecorder) BeforeValidatorSlashed(ctx, valAddr, fraction interface{}) *gomock.Call { +func (mr *MockStakingHooksMockRecorder) BeforeValidatorSlashed(ctx, valAddr, fraction any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BeforeValidatorSlashed", reflect.TypeOf((*MockStakingHooks)(nil).BeforeValidatorSlashed), ctx, valAddr, fraction) } diff --git a/x/poa/testutil/tx_mock.go b/x/poa/testutil/tx_mock.go index da0e160a..618eb81c 100644 --- a/x/poa/testutil/tx_mock.go +++ b/x/poa/testutil/tx_mock.go @@ -1,5 +1,10 @@ // Code generated by MockGen. DO NOT EDIT. // Source: x/poa/testutil/tx.go +// +// Generated by this command: +// +// mockgen -source=x/poa/testutil/tx.go -package testutil -destination=x/poa/testutil/tx_mock.go +// // Package testutil is a generated GoMock package. package testutil @@ -8,7 +13,7 @@ import ( reflect "reflect" types "github.com/cosmos/cosmos-sdk/types" - gomock "github.com/golang/mock/gomock" + gomock "go.uber.org/mock/gomock" proto "google.golang.org/protobuf/proto" ) @@ -16,6 +21,7 @@ import ( type MockTx struct { ctrl *gomock.Controller recorder *MockTxMockRecorder + isgomock struct{} } // MockTxMockRecorder is the mock recorder for MockTx.