e2e

package module
v0.0.0-...-9b24046 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2024 License: MIT Imports: 15 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, opts ...[]wasmkeeper.Option) *ibctesting.Coordinator

NewIBCCoordinator initializes Coordinator with N bcd TestChain instances

func Querier

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

Types

type ConsumerContract

type ConsumerContract struct {
	Babylon     sdk.AccAddress
	BTCStaking  sdk.AccAddress
	BTCFinality 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 TestConsumerClient

type TestConsumerClient struct {
	Chain     *ibctesting.TestChain
	Contracts ConsumerContract
	App       *app.ConsumerApp
	// contains filtered or unexported fields
}

func NewConsumerClient

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

func (*TestConsumerClient) BootstrapContracts

func (p *TestConsumerClient) BootstrapContracts() (*ConsumerContract, error)

TODO(babylon): deploy Babylon contracts

func (*TestConsumerClient) Exec

func (p *TestConsumerClient) Exec(contract sdk.AccAddress, payload []byte, funds ...sdk.Coin) (*abci.ExecTxResult, error)

func (*TestConsumerClient) GetSender

func (p *TestConsumerClient) GetSender() sdk.AccAddress

func (*TestConsumerClient) MustExecGovProposal

func (p *TestConsumerClient) MustExecGovProposal(msg *bbntypes.MsgUpdateParams)

MustExecGovProposal submit and vote yes on proposal

func (*TestConsumerClient) Query

func (p *TestConsumerClient) Query(contractAddr sdk.AccAddress, query Query) (QueryResponse, error)

type TestProviderClient

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

func NewProviderClient

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

func (*TestProviderClient) Exec

func (p *TestProviderClient) Exec(contract sdk.AccAddress, payload []byte, funds ...sdk.Coin) (*abci.ExecTxResult, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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