Documentation ¶
Overview ¶
Package keeper provides methods to initialize SDK keepers with local storage for test purposes
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ExampleTimestamp is a timestamp used as the current time for the context of the keepers returned from the package ExampleTimestamp = time.Date(2020, time.January, 1, 12, 0, 0, 0, time.UTC) // ExampleHeight is a block height used as the current block height for the context of test keeper ExampleHeight = int64(1111) )
Functions ¶
func ModuleAccountAddrs ¶
ModuleAccountAddrs returns all the app's module account addresses.
func NewTestSetup ¶
func NewTestSetup(t testing.TB) (sdk.Context, TestKeepers, TestMsgServers)
NewTestSetup returns initialized instances of all the keepers and message servers of the modules
Types ¶
type ProtocolVersionSetter ¶
type ProtocolVersionSetter struct{}
func (ProtocolVersionSetter) SetProtocolVersion ¶
func (vs ProtocolVersionSetter) SetProtocolVersion(uint64)
type TestKeepers ¶
type TestKeepers struct { T testing.TB AccountKeeper authkeeper.AccountKeeper BankKeeper bankkeeper.Keeper DistrKeeper distrkeeper.Keeper StakingKeeper *stakingkeeper.Keeper ClaimKeeper *claimkeeper.Keeper }
TestKeepers holds all keepers used during keeper tests for all modules
type TestMsgServers ¶
type TestMsgServers struct { T testing.TB ClaimSrv claimtypes.MsgServer }
TestMsgServers holds all message servers used during keeper tests for all modules
Click to show internal directories.
Click to hide internal directories.