testutil

package
v5.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2026 License: Apache-2.0 Imports: 37 Imported by: 1 module, 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

This section is empty.

Functions

func ExecCommand

func ExecCommand(
	t *testing.T,
	network *network.Network,
	clientCtx client.Context,
	cmd *cobra.Command,
	extraArgs []string,
) *coretypes.ResultTx

ExecCommand executes a tx command and returns the result

func NewConfig

func NewConfig() network.Config

NewConfig returns a new app config

func NewTestNetworkFixture

func NewTestNetworkFixture() network.TestFixture

NewTestNetworkFixture returns a new simapp AppConstructor for network simulation tests

func WaitForTx

func WaitForTx(
	t *testing.T,
	network *network.Network,
	clientCtx client.Context,
	txHash string,
) *coretypes.ResultTx

WaitForTx waits for a tx to be included in a block

Types

type AppWrapper

type AppWrapper struct {
	*app.IrisApp
}

AppWrapper extends an ABCI application, but with most of its parameters exported. They are exported for convenience in creating helper functions, as object capabilities aren't needed for testing.

func CreateApp

func CreateApp(t *testing.T) *AppWrapper

CreateApp initializes a new SimApp. A Nop logger is set in SimApp.

func CreateAppWithGenesisValSet

func CreateAppWithGenesisValSet(
	t *testing.T,
	valSet *tmtypes.ValidatorSet,
	genAccs []authtypes.GenesisAccount,
	balances ...banktypes.Balance,
) *AppWrapper

CreateAppWithGenesisValSet initializes a new SimApp with a validator set and genesis accounts that also act as delegators. For simplicity, each validator is bonded with a delegation of one consensus engine unit (10^6) in the default token of the simapp from first genesis account. A Nop logger is set in SimApp.

type EmptyAppOptions

type EmptyAppOptions struct{}

EmptyAppOptions is a stub implementing AppOptions

func (EmptyAppOptions) Get

func (ao EmptyAppOptions) Get(o string) interface{}

Get implements AppOptions

Jump to

Keyboard shortcuts

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