testutil

package
v3.1.1 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2022 License: GPL-3.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultNodeHome = "/tmp/.liked-test"

Variables

This section is empty.

Functions

func CreateIncrementalAccounts

func CreateIncrementalAccounts(accNum int) []sdk.AccAddress

func GetEventAttribute

func GetEventAttribute(events sdk.Events, typ string, attrKey []byte) []byte

func TestAddr

func TestAddr(addr string, bech string) (sdk.AccAddress, error)

Types

type GenesisBalance

type GenesisBalance struct {
	Address string
	Coin    string
}

type TestingApp

type TestingApp struct {
	*likeapp.LikeApp

	Header  tmproto.Header
	Context sdk.Context
	// contains filtered or unexported fields
}

func SetupTestApp

func SetupTestApp(genesisBalances []GenesisBalance) *TestingApp

func SetupTestAppWithDefaultState

func SetupTestAppWithDefaultState() *TestingApp

func SetupTestAppWithIscnGenesis

func SetupTestAppWithIscnGenesis(genesisBalances []GenesisBalance, iscnGenesisJson json.RawMessage) *TestingApp

func SetupTestAppWithState

func SetupTestAppWithState(appState json.RawMessage, appOptions servertypes.AppOptions) *TestingApp

func (*TestingApp) DeliverMsg

func (app *TestingApp) DeliverMsg(msg sdk.Msg, priv cryptotypes.PrivKey) (res *sdk.Result, err error, simErr error, deliverErr error)

func (*TestingApp) DeliverMsgNoError

func (app *TestingApp) DeliverMsgNoError(t *testing.T, msg sdk.Msg, priv cryptotypes.PrivKey) *sdk.Result

func (*TestingApp) DeliverMsgs

func (app *TestingApp) DeliverMsgs(msgs []sdk.Msg, priv cryptotypes.PrivKey) (res *sdk.Result, err error, simErr error, deliverErr error)

func (*TestingApp) DeliverMsgsNoError

func (app *TestingApp) DeliverMsgsNoError(t *testing.T, msgs []sdk.Msg, priv cryptotypes.PrivKey) *sdk.Result

func (*TestingApp) NextHeader

func (app *TestingApp) NextHeader(unixTimestamp int64)

func (*TestingApp) SetForQuery

func (app *TestingApp) SetForQuery() sdk.Context

func (*TestingApp) SetForTx

func (app *TestingApp) SetForTx()

Directories

Path Synopsis
Package nullify provides methods to init nil values structs for test assertion.
Package nullify provides methods to init nil values structs for test assertion.

Jump to

Keyboard shortcuts

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