e2e

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

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

Go to latest
Published: Mar 1, 2024 License: Apache-2.0 Imports: 36 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildInterchain

func BuildInterchain(t *testing.T, ctx context.Context, chain ibc.Chain) *interchaintest.Interchain

BuildInterchain creates a new Interchain testing env with the configured Block SDK CosmosChain

func ChainBuilderFromChainSpec

func ChainBuilderFromChainSpec(t *testing.T, spec *interchaintest.ChainSpec) ibc.Chain

ChainBuilderFromChainSpec creates an interchaintest chain builder factory given a ChainSpec and returns the associated chain

func TxHash

func TxHash(tx []byte) string

Types

type KeyringOverride

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

type TestSuite

type TestSuite struct {
	suite.Suite
	// contains filtered or unexported fields
}

TestSuite runs the feemarket e2e test-suite against a given interchaintest specification

func NewE2ETestSuiteFromSpec

func NewE2ETestSuiteFromSpec(spec *interchaintest.ChainSpec) *TestSuite

func (*TestSuite) Block

func (s *TestSuite) Block(chain *cosmos.CosmosChain, height int64) *rpctypes.ResultBlock

Block returns the block at the given height

func (*TestSuite) ExecTx

func (s *TestSuite) ExecTx(ctx context.Context, chain *cosmos.CosmosChain, keyName string, command ...string) (string, error)

ExecTx executes a cli command on a node, waits a block and queries the Tx to verify it was included on chain.

func (*TestSuite) GetAndFundTestUserWithMnemonic

func (s *TestSuite) GetAndFundTestUserWithMnemonic(
	ctx context.Context,
	keyNamePrefix, mnemonic string,
	amount int64,
	chain *cosmos.CosmosChain,
) (ibc.Wallet, error)

GetAndFundTestUserWithMnemonic restores a user using the given mnemonic and funds it with the native chain denom. The caller should wait for some blocks to complete before the funds will be accessible.

func (*TestSuite) GetAndFundTestUsers

func (s *TestSuite) GetAndFundTestUsers(
	ctx context.Context,
	keyNamePrefix string,
	amount int64,
	chains ...*cosmos.CosmosChain,
) []ibc.Wallet

GetAndFundTestUsers generates and funds chain users with the native chain denom. The caller should wait for some blocks to complete before the funds will be accessible.

func (*TestSuite) QueryAccountBalance

func (s *TestSuite) QueryAccountBalance(chain ibc.Chain, address, denom string) int64

QueryAccountBalance queries a given account's balance on the chain

func (*TestSuite) QueryAccountSequence

func (s *TestSuite) QueryAccountSequence(chain *cosmos.CosmosChain, address string) uint64

QueryAccountSequence

func (*TestSuite) QueryBaseFee

func (s *TestSuite) QueryBaseFee() sdk.Coins

func (*TestSuite) QueryParams

func (s *TestSuite) QueryParams() types.Params

func (*TestSuite) QueryState

func (s *TestSuite) QueryState() types.State

func (*TestSuite) QueryValidators

func (s *TestSuite) QueryValidators(chain *cosmos.CosmosChain) []sdk.ValAddress

QueryValidators queries for all the network's validators

func (*TestSuite) SendCoins

func (s *TestSuite) SendCoins(ctx context.Context, chain *cosmos.CosmosChain, keyName, sender, receiver string, amt, fees sdk.Coins, gas int64) (string, error)

SendCoins creates a executes a SendCoins message and broadcasts the transaction.

func (*TestSuite) SetupSubTest

func (s *TestSuite) SetupSubTest()

func (*TestSuite) SetupSuite

func (s *TestSuite) SetupSuite()

func (*TestSuite) SimulateTx

func (s *TestSuite) SimulateTx(ctx context.Context, user cosmos.User, height uint64, expectFail bool, msgs ...sdk.Msg)

SimulateTx simulates the provided messages, and checks whether the provided failure condition is met

func (*TestSuite) TearDownSuite

func (s *TestSuite) TearDownSuite()

func (*TestSuite) TestQueryBaseFee

func (s *TestSuite) TestQueryBaseFee()

func (*TestSuite) TestQueryParams

func (s *TestSuite) TestQueryParams()

func (*TestSuite) TestQueryState

func (s *TestSuite) TestQueryState()

func (*TestSuite) TestSendTxUpdating

func (s *TestSuite) TestSendTxUpdating()

func (*TestSuite) VerifyBlock

func (s *TestSuite) VerifyBlock(block *rpctypes.ResultBlock, offset int, bidTxHash string, txs [][]byte)

VerifyBlock takes a Block and verifies that it contains the given bid at the 0-th index, and the bundled txs immediately after

func (*TestSuite) VerifyBlockWithExpectedBlock

func (s *TestSuite) VerifyBlockWithExpectedBlock(chain *cosmos.CosmosChain, height uint64, txs [][]byte)

VerifyBlockWithExpectedBlock takes in a list of raw tx bytes and compares each tx hash to the tx hashes in the block. The expected block is the block that should be returned by the chain at the given height.

func (*TestSuite) WaitForHeight

func (s *TestSuite) WaitForHeight(chain *cosmos.CosmosChain, height uint64)

WaitForHeight waits for the chain to reach the given height

func (*TestSuite) WithDenom

func (s *TestSuite) WithDenom(denom string) *TestSuite

func (*TestSuite) WithKeyringOptions

func (s *TestSuite) WithKeyringOptions(cdc codec.Codec, opts keyring.Option)

Jump to

Keyboard shortcuts

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