e2e

package module
v0.0.0-...-b507993 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2024 License: MIT Imports: 30 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 *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 *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 {
	Vault           sdk.AccAddress
	NativeStaking   sdk.AccAddress
	ExternalStaking sdk.AccAddress
}

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 TestChain

type TestChain struct {
	*ibctesting.TestChain
	// contains filtered or unexported fields
}

func NewTestChain

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

func (*TestChain) IBCTestChain

func (tc *TestChain) IBCTestChain() *ibctesting.TestChain

func (*TestChain) SendMsgsWithSigner

func (tc *TestChain) SendMsgsWithSigner(privKey cryptotypes.PrivKey, signer *authtypes.BaseAccount, msgs ...sdk.Msg) (*sdk.Result, error)

type TestConsumerClient

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

func NewConsumerClient

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

func (*TestConsumerClient) BootstrapContracts

func (p *TestConsumerClient) BootstrapContracts(x example) ConsumerContract

func (*TestConsumerClient) ExecNewEpoch

func (p *TestConsumerClient) ExecNewEpoch()

func (*TestConsumerClient) ExecSetMaxCap

func (p *TestConsumerClient) ExecSetMaxCap(cap sdk.Coin)

func (*TestConsumerClient) MustEnableVirtualStaking

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

MustEnableVirtualStaking add authority to mint/burn virtual tokens gov proposal

func (*TestConsumerClient) MustExecConsumerGovProposal

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

MustExecGovProposal submit and vote yes on proposal

func (*TestConsumerClient) QueryMaxCap

type TestProviderClient

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

func NewProviderClient

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

func (TestProviderClient) BankSendWithSigner

func (p TestProviderClient) BankSendWithSigner(privKey cryptotypes.PrivKey, signer *authtypes.BaseAccount, to string, coins ...sdk.Coin) error

func (*TestProviderClient) BootstrapContracts

func (p *TestProviderClient) BootstrapContracts(provApp *providerapp.MeshProviderApp, 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) ExecVaultWithSigner

func (p TestProviderClient) ExecVaultWithSigner(privKey cryptotypes.PrivKey, signer *authtypes.BaseAccount, payload string, funds ...sdk.Coin) error

func (TestProviderClient) ExecWithSigner

func (p TestProviderClient) ExecWithSigner(privKey cryptotypes.PrivKey, signer *authtypes.BaseAccount, contract sdk.AccAddress, payload string, funds ...sdk.Coin) (*sdk.Result, error)

func (TestProviderClient) MustCreatePermanentLockedAccount

func (p TestProviderClient) MustCreatePermanentLockedAccount(acc string, coins ...sdk.Coin) *sdk.Result

func (TestProviderClient) MustExecExtStaking

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

func (TestProviderClient) MustExecParamsChangeProposal

func (p TestProviderClient) MustExecParamsChangeProposal(provApp *providerapp.MeshProviderApp, vault, nativeStaking string)

MustExecGovProposal submit and vote yes on proposal

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

func (p TestProviderClient) MustExecVaultWithSigner(privKey cryptotypes.PrivKey, signer *authtypes.BaseAccount, 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) QueryNativeStaking

func (p TestProviderClient) QueryNativeStaking(q Query) QueryResponse

func (TestProviderClient) QueryNativeStakingProxyByOwner

func (p TestProviderClient) QueryNativeStakingProxyByOwner(user string) sdk.AccAddress

func (TestProviderClient) QuerySlashableAmount

func (p TestProviderClient) QuerySlashableAmount() int

func (TestProviderClient) QuerySpecificAddressVaultBalance

func (p TestProviderClient) QuerySpecificAddressVaultBalance(address string) 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