testutil

package
v0.47.10-ics-lsm Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 28, 2024 License: Apache-2.0 Imports: 36 Imported by: 0

Documentation

Overview

Package testutil is a generated GoMock package.

Index

Constants

This section is empty.

Variables

View Source
var AppConfig = appconfig.Compose(&appv1alpha1.Config{
	Modules: []*appv1alpha1.ModuleConfig{
		{
			Name: "runtime",
			Config: appconfig.WrapAny(&runtimev1alpha1.Module{
				AppName: "SlashingApp",
				BeginBlockers: []string{
					minttypes.ModuleName,
					distrtypes.ModuleName,
					stakingtypes.ModuleName,
					authtypes.ModuleName,
					banktypes.ModuleName,
					genutiltypes.ModuleName,
					slashingtypes.ModuleName,
					paramstypes.ModuleName,
					consensustypes.ModuleName,
				},
				EndBlockers: []string{
					stakingtypes.ModuleName,
					authtypes.ModuleName,
					banktypes.ModuleName,
					genutiltypes.ModuleName,
					distrtypes.ModuleName,
					minttypes.ModuleName,
					slashingtypes.ModuleName,
					paramstypes.ModuleName,
					consensustypes.ModuleName,
				},
				InitGenesis: []string{
					authtypes.ModuleName,
					banktypes.ModuleName,
					distrtypes.ModuleName,
					stakingtypes.ModuleName,
					minttypes.ModuleName,
					slashingtypes.ModuleName,
					genutiltypes.ModuleName,
					paramstypes.ModuleName,
					consensustypes.ModuleName,
				},
			}),
		},
		{
			Name: authtypes.ModuleName,
			Config: appconfig.WrapAny(&authmodulev1.Module{
				Bech32Prefix: "cosmos",
				ModuleAccountPermissions: []*authmodulev1.ModuleAccountPermission{
					{Account: authtypes.FeeCollectorName},
					{Account: distrtypes.ModuleName},
					{Account: minttypes.ModuleName, Permissions: []string{authtypes.Minter}},
					{Account: stakingtypes.BondedPoolName, Permissions: []string{authtypes.Burner, stakingtypes.ModuleName}},
					{Account: stakingtypes.NotBondedPoolName, Permissions: []string{authtypes.Burner, stakingtypes.ModuleName}},
				},
			}),
		},

		{
			Name:   banktypes.ModuleName,
			Config: appconfig.WrapAny(&bankmodulev1.Module{}),
		},
		{
			Name:   stakingtypes.ModuleName,
			Config: appconfig.WrapAny(&stakingmodulev1.Module{}),
		},
		{
			Name:   slashingtypes.ModuleName,
			Config: appconfig.WrapAny(&slashingmodulev1.Module{}),
		},
		{
			Name:   paramstypes.ModuleName,
			Config: appconfig.WrapAny(&paramsmodulev1.Module{}),
		},
		{
			Name:   consensustypes.ModuleName,
			Config: appconfig.WrapAny(&consensusmodulev1.Module{}),
		},
		{
			Name:   "tx",
			Config: appconfig.WrapAny(&txconfigv1.Config{}),
		},
		{
			Name:   genutiltypes.ModuleName,
			Config: appconfig.WrapAny(&genutilmodulev1.Module{}),
		},
		{
			Name:   minttypes.ModuleName,
			Config: appconfig.WrapAny(&mintmodulev1.Module{}),
		},
		{
			Name:   distrtypes.ModuleName,
			Config: appconfig.WrapAny(&distrmodulev1.Module{}),
		},
	},
})

Functions

func TestParams

func TestParams() types.Params

TestParams construct default slashing params for tests. Have to change these parameters for tests lest the tests take forever

Types

type MockAccountKeeper

type MockAccountKeeper struct {
	// contains filtered or unexported fields
}

MockAccountKeeper is a mock of AccountKeeper interface.

func NewMockAccountKeeper

func NewMockAccountKeeper(ctrl *gomock.Controller) *MockAccountKeeper

NewMockAccountKeeper creates a new mock instance.

func (*MockAccountKeeper) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockAccountKeeper) GetAccount

func (m *MockAccountKeeper) GetAccount(ctx types.Context, addr types.AccAddress) types0.AccountI

GetAccount mocks base method.

func (*MockAccountKeeper) IterateAccounts

func (m *MockAccountKeeper) IterateAccounts(ctx types.Context, process func(types0.AccountI) bool)

IterateAccounts mocks base method.

type MockAccountKeeperMockRecorder

type MockAccountKeeperMockRecorder struct {
	// contains filtered or unexported fields
}

MockAccountKeeperMockRecorder is the mock recorder for MockAccountKeeper.

func (*MockAccountKeeperMockRecorder) GetAccount

func (mr *MockAccountKeeperMockRecorder) GetAccount(ctx, addr interface{}) *gomock.Call

GetAccount indicates an expected call of GetAccount.

func (*MockAccountKeeperMockRecorder) IterateAccounts

func (mr *MockAccountKeeperMockRecorder) IterateAccounts(ctx, process interface{}) *gomock.Call

IterateAccounts indicates an expected call of IterateAccounts.

type MockBankKeeper

type MockBankKeeper struct {
	// contains filtered or unexported fields
}

MockBankKeeper is a mock of BankKeeper interface.

func NewMockBankKeeper

func NewMockBankKeeper(ctrl *gomock.Controller) *MockBankKeeper

NewMockBankKeeper creates a new mock instance.

func (*MockBankKeeper) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockBankKeeper) GetAllBalances

func (m *MockBankKeeper) GetAllBalances(ctx types.Context, addr types.AccAddress) types.Coins

GetAllBalances mocks base method.

func (*MockBankKeeper) GetBalance

func (m *MockBankKeeper) GetBalance(ctx types.Context, addr types.AccAddress, denom string) types.Coin

GetBalance mocks base method.

func (*MockBankKeeper) LockedCoins

func (m *MockBankKeeper) LockedCoins(ctx types.Context, addr types.AccAddress) types.Coins

LockedCoins mocks base method.

func (*MockBankKeeper) SpendableCoins

func (m *MockBankKeeper) SpendableCoins(ctx types.Context, addr types.AccAddress) types.Coins

SpendableCoins mocks base method.

type MockBankKeeperMockRecorder

type MockBankKeeperMockRecorder struct {
	// contains filtered or unexported fields
}

MockBankKeeperMockRecorder is the mock recorder for MockBankKeeper.

func (*MockBankKeeperMockRecorder) GetAllBalances

func (mr *MockBankKeeperMockRecorder) GetAllBalances(ctx, addr interface{}) *gomock.Call

GetAllBalances indicates an expected call of GetAllBalances.

func (*MockBankKeeperMockRecorder) GetBalance

func (mr *MockBankKeeperMockRecorder) GetBalance(ctx, addr, denom interface{}) *gomock.Call

GetBalance indicates an expected call of GetBalance.

func (*MockBankKeeperMockRecorder) LockedCoins

func (mr *MockBankKeeperMockRecorder) LockedCoins(ctx, addr interface{}) *gomock.Call

LockedCoins indicates an expected call of LockedCoins.

func (*MockBankKeeperMockRecorder) SpendableCoins

func (mr *MockBankKeeperMockRecorder) SpendableCoins(ctx, addr interface{}) *gomock.Call

SpendableCoins indicates an expected call of SpendableCoins.

type MockParamSubspace

type MockParamSubspace struct {
	// contains filtered or unexported fields
}

MockParamSubspace is a mock of ParamSubspace interface.

func NewMockParamSubspace

func NewMockParamSubspace(ctrl *gomock.Controller) *MockParamSubspace

NewMockParamSubspace creates a new mock instance.

func (*MockParamSubspace) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockParamSubspace) Get

func (m *MockParamSubspace) Get(ctx types.Context, key []byte, ptr interface{})

Get mocks base method.

func (*MockParamSubspace) GetParamSet

func (m *MockParamSubspace) GetParamSet(ctx types.Context, ps types1.ParamSet)

GetParamSet mocks base method.

func (*MockParamSubspace) HasKeyTable

func (m *MockParamSubspace) HasKeyTable() bool

HasKeyTable mocks base method.

func (*MockParamSubspace) SetParamSet

func (m *MockParamSubspace) SetParamSet(ctx types.Context, ps types1.ParamSet)

SetParamSet mocks base method.

func (*MockParamSubspace) WithKeyTable

func (m *MockParamSubspace) WithKeyTable(table types1.KeyTable) types1.Subspace

WithKeyTable mocks base method.

type MockParamSubspaceMockRecorder

type MockParamSubspaceMockRecorder struct {
	// contains filtered or unexported fields
}

MockParamSubspaceMockRecorder is the mock recorder for MockParamSubspace.

func (*MockParamSubspaceMockRecorder) Get

func (mr *MockParamSubspaceMockRecorder) Get(ctx, key, ptr interface{}) *gomock.Call

Get indicates an expected call of Get.

func (*MockParamSubspaceMockRecorder) GetParamSet

func (mr *MockParamSubspaceMockRecorder) GetParamSet(ctx, ps interface{}) *gomock.Call

GetParamSet indicates an expected call of GetParamSet.

func (*MockParamSubspaceMockRecorder) HasKeyTable

func (mr *MockParamSubspaceMockRecorder) HasKeyTable() *gomock.Call

HasKeyTable indicates an expected call of HasKeyTable.

func (*MockParamSubspaceMockRecorder) SetParamSet

func (mr *MockParamSubspaceMockRecorder) SetParamSet(ctx, ps interface{}) *gomock.Call

SetParamSet indicates an expected call of SetParamSet.

func (*MockParamSubspaceMockRecorder) WithKeyTable

func (mr *MockParamSubspaceMockRecorder) WithKeyTable(table interface{}) *gomock.Call

WithKeyTable indicates an expected call of WithKeyTable.

type MockStakingHooks

type MockStakingHooks struct {
	// contains filtered or unexported fields
}

MockStakingHooks is a mock of StakingHooks interface.

func NewMockStakingHooks

func NewMockStakingHooks(ctrl *gomock.Controller) *MockStakingHooks

NewMockStakingHooks creates a new mock instance.

func (*MockStakingHooks) AfterDelegationModified

func (m *MockStakingHooks) AfterDelegationModified(ctx types.Context, delAddr types.AccAddress, valAddr types.ValAddress) error

AfterDelegationModified mocks base method.

func (*MockStakingHooks) AfterValidatorBeginUnbonding

func (m *MockStakingHooks) AfterValidatorBeginUnbonding(ctx types.Context, consAddr types.ConsAddress, valAddr types.ValAddress) error

AfterValidatorBeginUnbonding mocks base method.

func (*MockStakingHooks) AfterValidatorBonded

func (m *MockStakingHooks) AfterValidatorBonded(ctx types.Context, consAddr types.ConsAddress, valAddr types.ValAddress) error

AfterValidatorBonded mocks base method.

func (*MockStakingHooks) AfterValidatorCreated

func (m *MockStakingHooks) AfterValidatorCreated(ctx types.Context, valAddr types.ValAddress) error

AfterValidatorCreated mocks base method.

func (*MockStakingHooks) AfterValidatorRemoved

func (m *MockStakingHooks) AfterValidatorRemoved(ctx types.Context, consAddr types.ConsAddress, valAddr types.ValAddress) error

AfterValidatorRemoved mocks base method.

func (*MockStakingHooks) BeforeDelegationCreated

func (m *MockStakingHooks) BeforeDelegationCreated(ctx types.Context, delAddr types.AccAddress, valAddr types.ValAddress) error

BeforeDelegationCreated mocks base method.

func (*MockStakingHooks) BeforeDelegationRemoved

func (m *MockStakingHooks) BeforeDelegationRemoved(ctx types.Context, delAddr types.AccAddress, valAddr types.ValAddress) error

BeforeDelegationRemoved mocks base method.

func (*MockStakingHooks) BeforeDelegationSharesModified

func (m *MockStakingHooks) BeforeDelegationSharesModified(ctx types.Context, delAddr types.AccAddress, valAddr types.ValAddress) error

BeforeDelegationSharesModified mocks base method.

func (*MockStakingHooks) BeforeValidatorModified

func (m *MockStakingHooks) BeforeValidatorModified(ctx types.Context, valAddr types.ValAddress) error

BeforeValidatorModified mocks base method.

func (*MockStakingHooks) BeforeValidatorSlashed

func (m *MockStakingHooks) BeforeValidatorSlashed(ctx types.Context, valAddr types.ValAddress, fraction types.Dec) error

BeforeValidatorSlashed mocks base method.

func (*MockStakingHooks) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

type MockStakingHooksMockRecorder

type MockStakingHooksMockRecorder struct {
	// contains filtered or unexported fields
}

MockStakingHooksMockRecorder is the mock recorder for MockStakingHooks.

func (*MockStakingHooksMockRecorder) AfterDelegationModified

func (mr *MockStakingHooksMockRecorder) AfterDelegationModified(ctx, delAddr, valAddr interface{}) *gomock.Call

AfterDelegationModified indicates an expected call of AfterDelegationModified.

func (*MockStakingHooksMockRecorder) AfterValidatorBeginUnbonding

func (mr *MockStakingHooksMockRecorder) AfterValidatorBeginUnbonding(ctx, consAddr, valAddr interface{}) *gomock.Call

AfterValidatorBeginUnbonding indicates an expected call of AfterValidatorBeginUnbonding.

func (*MockStakingHooksMockRecorder) AfterValidatorBonded

func (mr *MockStakingHooksMockRecorder) AfterValidatorBonded(ctx, consAddr, valAddr interface{}) *gomock.Call

AfterValidatorBonded indicates an expected call of AfterValidatorBonded.

func (*MockStakingHooksMockRecorder) AfterValidatorCreated

func (mr *MockStakingHooksMockRecorder) AfterValidatorCreated(ctx, valAddr interface{}) *gomock.Call

AfterValidatorCreated indicates an expected call of AfterValidatorCreated.

func (*MockStakingHooksMockRecorder) AfterValidatorRemoved

func (mr *MockStakingHooksMockRecorder) AfterValidatorRemoved(ctx, consAddr, valAddr interface{}) *gomock.Call

AfterValidatorRemoved indicates an expected call of AfterValidatorRemoved.

func (*MockStakingHooksMockRecorder) BeforeDelegationCreated

func (mr *MockStakingHooksMockRecorder) BeforeDelegationCreated(ctx, delAddr, valAddr interface{}) *gomock.Call

BeforeDelegationCreated indicates an expected call of BeforeDelegationCreated.

func (*MockStakingHooksMockRecorder) BeforeDelegationRemoved

func (mr *MockStakingHooksMockRecorder) BeforeDelegationRemoved(ctx, delAddr, valAddr interface{}) *gomock.Call

BeforeDelegationRemoved indicates an expected call of BeforeDelegationRemoved.

func (*MockStakingHooksMockRecorder) BeforeDelegationSharesModified

func (mr *MockStakingHooksMockRecorder) BeforeDelegationSharesModified(ctx, delAddr, valAddr interface{}) *gomock.Call

BeforeDelegationSharesModified indicates an expected call of BeforeDelegationSharesModified.

func (*MockStakingHooksMockRecorder) BeforeValidatorModified

func (mr *MockStakingHooksMockRecorder) BeforeValidatorModified(ctx, valAddr interface{}) *gomock.Call

BeforeValidatorModified indicates an expected call of BeforeValidatorModified.

func (*MockStakingHooksMockRecorder) BeforeValidatorSlashed

func (mr *MockStakingHooksMockRecorder) BeforeValidatorSlashed(ctx, valAddr, fraction interface{}) *gomock.Call

BeforeValidatorSlashed indicates an expected call of BeforeValidatorSlashed.

type MockStakingKeeper

type MockStakingKeeper struct {
	// contains filtered or unexported fields
}

MockStakingKeeper is a mock of StakingKeeper interface.

func NewMockStakingKeeper

func NewMockStakingKeeper(ctrl *gomock.Controller) *MockStakingKeeper

NewMockStakingKeeper creates a new mock instance.

func (*MockStakingKeeper) Delegation

Delegation mocks base method.

func (*MockStakingKeeper) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockStakingKeeper) GetAllValidators

func (m *MockStakingKeeper) GetAllValidators(ctx types.Context) []types2.Validator

GetAllValidators mocks base method.

func (*MockStakingKeeper) IsValidatorJailed

func (m *MockStakingKeeper) IsValidatorJailed(ctx types.Context, addr types.ConsAddress) bool

IsValidatorJailed mocks base method.

func (*MockStakingKeeper) IterateValidators

func (m *MockStakingKeeper) IterateValidators(arg0 types.Context, arg1 func(int64, types2.ValidatorI) bool)

IterateValidators mocks base method.

func (*MockStakingKeeper) Jail

func (m *MockStakingKeeper) Jail(arg0 types.Context, arg1 types.ConsAddress)

Jail mocks base method.

func (*MockStakingKeeper) MaxValidators

func (m *MockStakingKeeper) MaxValidators(arg0 types.Context) uint32

MaxValidators mocks base method.

func (*MockStakingKeeper) Slash

func (m *MockStakingKeeper) Slash(arg0 types.Context, arg1 types.ConsAddress, arg2, arg3 int64, arg4 types.Dec) math.Int

Slash mocks base method.

func (*MockStakingKeeper) SlashWithInfractionReason

func (m *MockStakingKeeper) SlashWithInfractionReason(arg0 types.Context, arg1 types.ConsAddress, arg2, arg3 int64, arg4 types.Dec, arg5 types2.Infraction) math.Int

SlashWithInfractionReason mocks base method.

func (*MockStakingKeeper) Unjail

func (m *MockStakingKeeper) Unjail(arg0 types.Context, arg1 types.ConsAddress)

Unjail mocks base method.

func (*MockStakingKeeper) Validator

func (m *MockStakingKeeper) Validator(arg0 types.Context, arg1 types.ValAddress) types2.ValidatorI

Validator mocks base method.

func (*MockStakingKeeper) ValidatorByConsAddr

func (m *MockStakingKeeper) ValidatorByConsAddr(arg0 types.Context, arg1 types.ConsAddress) types2.ValidatorI

ValidatorByConsAddr mocks base method.

type MockStakingKeeperMockRecorder

type MockStakingKeeperMockRecorder struct {
	// contains filtered or unexported fields
}

MockStakingKeeperMockRecorder is the mock recorder for MockStakingKeeper.

func (*MockStakingKeeperMockRecorder) Delegation

func (mr *MockStakingKeeperMockRecorder) Delegation(arg0, arg1, arg2 interface{}) *gomock.Call

Delegation indicates an expected call of Delegation.

func (*MockStakingKeeperMockRecorder) GetAllValidators

func (mr *MockStakingKeeperMockRecorder) GetAllValidators(ctx interface{}) *gomock.Call

GetAllValidators indicates an expected call of GetAllValidators.

func (*MockStakingKeeperMockRecorder) IsValidatorJailed

func (mr *MockStakingKeeperMockRecorder) IsValidatorJailed(ctx, addr interface{}) *gomock.Call

IsValidatorJailed indicates an expected call of IsValidatorJailed.

func (*MockStakingKeeperMockRecorder) IterateValidators

func (mr *MockStakingKeeperMockRecorder) IterateValidators(arg0, arg1 interface{}) *gomock.Call

IterateValidators indicates an expected call of IterateValidators.

func (*MockStakingKeeperMockRecorder) Jail

func (mr *MockStakingKeeperMockRecorder) Jail(arg0, arg1 interface{}) *gomock.Call

Jail indicates an expected call of Jail.

func (*MockStakingKeeperMockRecorder) MaxValidators

func (mr *MockStakingKeeperMockRecorder) MaxValidators(arg0 interface{}) *gomock.Call

MaxValidators indicates an expected call of MaxValidators.

func (*MockStakingKeeperMockRecorder) Slash

func (mr *MockStakingKeeperMockRecorder) Slash(arg0, arg1, arg2, arg3, arg4 interface{}) *gomock.Call

Slash indicates an expected call of Slash.

func (*MockStakingKeeperMockRecorder) SlashWithInfractionReason

func (mr *MockStakingKeeperMockRecorder) SlashWithInfractionReason(arg0, arg1, arg2, arg3, arg4, arg5 interface{}) *gomock.Call

SlashWithInfractionReason indicates an expected call of SlashWithInfractionReason.

func (*MockStakingKeeperMockRecorder) Unjail

func (mr *MockStakingKeeperMockRecorder) Unjail(arg0, arg1 interface{}) *gomock.Call

Unjail indicates an expected call of Unjail.

func (*MockStakingKeeperMockRecorder) Validator

func (mr *MockStakingKeeperMockRecorder) Validator(arg0, arg1 interface{}) *gomock.Call

Validator indicates an expected call of Validator.

func (*MockStakingKeeperMockRecorder) ValidatorByConsAddr

func (mr *MockStakingKeeperMockRecorder) ValidatorByConsAddr(arg0, arg1 interface{}) *gomock.Call

ValidatorByConsAddr indicates an expected call of ValidatorByConsAddr.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL