testutil

package
v2.0.2 Latest Latest
Warning

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

Go to latest
Published: May 27, 2022 License: GPL-3.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

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

Variables

This section is empty.

Functions

func GetEventAttribute

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

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