testutil

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2024 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Overview

Package testutil is a generated GoMock package.

Index

Constants

This section is empty.

Variables

InitTokens is the default power validators are initialized to have within tests

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

GetAccount mocks base method.

func (*MockAccountKeeper) IterateAccounts

func (m *MockAccountKeeper) IterateAccounts(ctx context.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 context.Context, addr types0.AccAddress) types0.Coins

GetAllBalances mocks base method.

func (*MockBankKeeper) GetBalance

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

GetBalance mocks base method.

func (*MockBankKeeper) LockedCoins

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

LockedCoins mocks base method.

func (*MockBankKeeper) SpendableCoins

func (m *MockBankKeeper) SpendableCoins(ctx context.Context, addr types0.AccAddress) types0.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 types0.Context, key []byte, ptr interface{})

Get mocks base method.

func (*MockParamSubspace) GetParamSet

func (m *MockParamSubspace) GetParamSet(ctx types0.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 types0.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 context.Context, delAddr types0.AccAddress, valAddr types0.ValAddress) error

AfterDelegationModified mocks base method.

func (*MockStakingHooks) AfterValidatorBeginUnbonding

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

AfterValidatorBeginUnbonding mocks base method.

func (*MockStakingHooks) AfterValidatorBonded

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

AfterValidatorBonded mocks base method.

func (*MockStakingHooks) AfterValidatorCreated

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

AfterValidatorCreated mocks base method.

func (*MockStakingHooks) AfterValidatorRemoved

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

AfterValidatorRemoved mocks base method.

func (*MockStakingHooks) BeforeDelegationCreated

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

BeforeDelegationCreated mocks base method.

func (*MockStakingHooks) BeforeDelegationRemoved

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

BeforeDelegationRemoved mocks base method.

func (*MockStakingHooks) BeforeDelegationSharesModified

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

BeforeDelegationSharesModified mocks base method.

func (*MockStakingHooks) BeforeValidatorModified

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

BeforeValidatorModified mocks base method.

func (*MockStakingHooks) BeforeValidatorSlashed

func (m *MockStakingHooks) BeforeValidatorSlashed(ctx context.Context, valAddr types0.ValAddress, fraction math.LegacyDec) 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) ConsensusAddressCodec

func (m *MockStakingKeeper) ConsensusAddressCodec() address.Codec

ConsensusAddressCodec mocks base method.

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 context.Context) ([]types.Validator, error)

GetAllValidators mocks base method.

func (*MockStakingKeeper) IsValidatorJailed

func (m *MockStakingKeeper) IsValidatorJailed(ctx context.Context, addr types0.ConsAddress) (bool, error)

IsValidatorJailed mocks base method.

func (*MockStakingKeeper) IterateValidators

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

IterateValidators mocks base method.

func (*MockStakingKeeper) Jail

Jail mocks base method.

func (*MockStakingKeeper) MaxValidators

func (m *MockStakingKeeper) MaxValidators(arg0 context.Context) (uint32, error)

MaxValidators mocks base method.

func (*MockStakingKeeper) Slash

func (m *MockStakingKeeper) Slash(arg0 context.Context, arg1 types0.ConsAddress, arg2, arg3 int64, arg4 math.LegacyDec) (math.Int, error)

Slash mocks base method.

func (*MockStakingKeeper) SlashWithInfractionReason

func (m *MockStakingKeeper) SlashWithInfractionReason(arg0 context.Context, arg1 types0.ConsAddress, arg2, arg3 int64, arg4 math.LegacyDec, arg5 types.Infraction) (math.Int, error)

SlashWithInfractionReason mocks base method.

func (*MockStakingKeeper) Unjail

func (m *MockStakingKeeper) Unjail(arg0 context.Context, arg1 types0.ConsAddress) error

Unjail mocks base method.

func (*MockStakingKeeper) Validator

Validator mocks base method.

func (*MockStakingKeeper) ValidatorAddressCodec

func (m *MockStakingKeeper) ValidatorAddressCodec() address.Codec

ValidatorAddressCodec mocks base method.

func (*MockStakingKeeper) ValidatorByConsAddr

func (m *MockStakingKeeper) ValidatorByConsAddr(arg0 context.Context, arg1 types0.ConsAddress) (types.ValidatorI, error)

ValidatorByConsAddr mocks base method.

type MockStakingKeeperMockRecorder

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

MockStakingKeeperMockRecorder is the mock recorder for MockStakingKeeper.

func (*MockStakingKeeperMockRecorder) ConsensusAddressCodec

func (mr *MockStakingKeeperMockRecorder) ConsensusAddressCodec() *gomock.Call

ConsensusAddressCodec indicates an expected call of ConsensusAddressCodec.

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) ValidatorAddressCodec

func (mr *MockStakingKeeperMockRecorder) ValidatorAddressCodec() *gomock.Call

ValidatorAddressCodec indicates an expected call of ValidatorAddressCodec.

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