apptesting

package
v0.24.0 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2026 License: Apache-2.0 Imports: 15 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	SecondaryDenom  = "uakt"
	SecondaryAmount = math.NewInt(100000000)
)

Functions

func AddTestAddrs added in v0.20.2

func AddTestAddrs(bankKeeper bankkeeper.Keeper, stakingKeeper BondDenomProvider, ctx sdk.Context, accNum int, accAmt math.Int) []sdk.AccAddress

AddTestAddrs constructs and returns accNum amount of accounts with an initial balance of accAmt in random order

func ConvertAddrsToValAddrs added in v0.20.2

func ConvertAddrsToValAddrs(addrs []sdk.AccAddress) []sdk.ValAddress

ConvertAddrsToValAddrs converts the provided addresses to ValAddress.

func CreateRandomAccounts

func CreateRandomAccounts(numAccts int) []sdk.AccAddress

CreateRandomAccounts is a function return a list of randomly generated AccAddresses

Types

type BondDenomProvider added in v0.20.2

type BondDenomProvider interface {
	BondDenom(ctx sdk.Context) string
}

type GenerateAccountStrategy added in v0.20.2

type GenerateAccountStrategy func(int) []sdk.AccAddress

type KeeperTestHelper

type KeeperTestHelper struct {
	suite.Suite

	App         *app.BitsongApp                 // Mock bitsong application
	Ctx         sdk.Context                     // simulated context
	QueryHelper *baseapp.QueryServiceTestHelper // GRPC query simulator
	TestAccs    []sdk.AccAddress                // Test accounts

	StakingHelper *stakinghelper.Helper // Useful staking helpers
	// contains filtered or unexported fields
}

func (*KeeperTestHelper) FundAcc added in v0.20.2

func (s *KeeperTestHelper) FundAcc(acc sdk.AccAddress, amounts sdk.Coins)

FundAcc funds target address with specified amount.

func (*KeeperTestHelper) Reset added in v0.21.0

func (s *KeeperTestHelper) Reset()

func (*KeeperTestHelper) Setup

func (s *KeeperTestHelper) Setup()

Jump to

Keyboard shortcuts

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