e2e

package module
v0.0.0-...-3cdce6e Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2023 License: MIT Imports: 24 Imported by: 0

README

End-To-End Tests

Multi-chain system tests that run against the demo app.

Run them with:

make test

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InstantiateContract

func InstantiateContract(t *testing.T, chain *ibctesting.TestChain, codeID uint64, initMsg []byte, funds ...sdk.Coin) sdk.AccAddress

func NewIBCCoordinator

func NewIBCCoordinator(t *testing.T, n int, opts ...[]wasmkeeper.Option) *ibctesting.Coordinator

NewIBCCoordinator initializes Coordinator with N meshd TestChain instances

func Querier

func Querier(t *testing.T, chain *ibctesting.TestChain) func(contract string, query Query) QueryResponse

Types

type ConsumerContract

type ConsumerContract struct {
	// contains filtered or unexported fields
}

type HighLowType

type HighLowType struct {
	High, Low int
}

func ParseHighLow

func ParseHighLow(t *testing.T, a any) HighLowType

ParseHighLow convert json source type into custom type

type ProviderContracts

type ProviderContracts struct {
	// contains filtered or unexported fields
}

type Query

type Query map[string]map[string]any

Query is a query type used in tests only

type QueryResponse

type QueryResponse map[string]any

QueryResponse is a response type used in tests only

func (QueryResponse) Array

func (q QueryResponse) Array(key string) []QueryResponse

func (QueryResponse) To

func (q QueryResponse) To(path ...string) QueryResponse

To can be used to navigate through the map structure

type TestConsumerClient

type TestConsumerClient struct {
	// contains filtered or unexported fields
}

func NewConsumerClient

func NewConsumerClient(t *testing.T, chain *ibctesting.TestChain) *TestConsumerClient

func (*TestConsumerClient) BootstrapContracts

func (p *TestConsumerClient) BootstrapContracts() ConsumerContract

func (*TestConsumerClient) ExecNewEpoch

func (p *TestConsumerClient) ExecNewEpoch()

func (*TestConsumerClient) MustEnableVirtualStaking

func (p *TestConsumerClient) MustEnableVirtualStaking(maxCap sdk.Coin)

MustEnableVirtualStaking add authority to mint/burn virtual tokens gov proposal

func (*TestConsumerClient) MustExecGovProposal

func (p *TestConsumerClient) MustExecGovProposal(msg *types.MsgSetVirtualStakingMaxCap)

MustExecGovProposal submit and vote yes on proposal

func (*TestConsumerClient) QueryMaxCap

type TestProviderClient

type TestProviderClient struct {
	// contains filtered or unexported fields
}

func NewProviderClient

func NewProviderClient(t *testing.T, chain *ibctesting.TestChain) *TestProviderClient

func (*TestProviderClient) BootstrapContracts

func (p *TestProviderClient) BootstrapContracts(connId, portID string) ProviderContracts

func (TestProviderClient) Exec

func (p TestProviderClient) Exec(contract sdk.AccAddress, payload string, funds ...sdk.Coin) (*sdk.Result, error)

func (TestProviderClient) ExecStakeRemote

func (p TestProviderClient) ExecStakeRemote(val string, amt sdk.Coin) error

func (TestProviderClient) MustExecExtStaking

func (p TestProviderClient) MustExecExtStaking(payload string, funds ...sdk.Coin) *sdk.Result

func (TestProviderClient) MustExecStakeRemote

func (p TestProviderClient) MustExecStakeRemote(val string, amt sdk.Coin)

func (TestProviderClient) MustExecVault

func (p TestProviderClient) MustExecVault(payload string, funds ...sdk.Coin) *sdk.Result

func (TestProviderClient) MustFailExecVault

func (p TestProviderClient) MustFailExecVault(payload string, funds ...sdk.Coin) error

func (TestProviderClient) QueryExtStaking

func (p TestProviderClient) QueryExtStaking(q Query) QueryResponse

func (TestProviderClient) QueryExtStakingAmount

func (p TestProviderClient) QueryExtStakingAmount(user, validator string) int

func (TestProviderClient) QueryMaxLien

func (p TestProviderClient) QueryMaxLien() int

func (TestProviderClient) QuerySlashableAmount

func (p TestProviderClient) QuerySlashableAmount() int

func (TestProviderClient) QueryVault

func (p TestProviderClient) QueryVault(q Query) QueryResponse

func (TestProviderClient) QueryVaultBalance

func (p TestProviderClient) QueryVaultBalance() int

func (TestProviderClient) QueryVaultFreeBalance

func (p TestProviderClient) QueryVaultFreeBalance() int

Jump to

Keyboard shortcuts

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