Documentation ¶
Index ¶
- func BuildInterchain(t *testing.T, ctx context.Context, chain ibc.Chain) *interchaintest.Interchain
- func ChainBuilderFromChainSpec(t *testing.T, spec *interchaintest.ChainSpec) ibc.Chain
- func TxHash(tx []byte) string
- type KeyringOverride
- type TestSuite
- func (s *TestSuite) Block(chain *cosmos.CosmosChain, height int64) *rpctypes.ResultBlock
- func (s *TestSuite) ExecTx(ctx context.Context, chain *cosmos.CosmosChain, keyName string, ...) (string, error)
- func (s *TestSuite) GetAndFundTestUserWithMnemonic(ctx context.Context, keyNamePrefix, mnemonic string, amount int64, ...) (ibc.Wallet, error)
- func (s *TestSuite) GetAndFundTestUsers(ctx context.Context, keyNamePrefix string, amount int64, ...) []ibc.Wallet
- func (s *TestSuite) QueryAccountBalance(chain ibc.Chain, address, denom string) int64
- func (s *TestSuite) QueryAccountSequence(chain *cosmos.CosmosChain, address string) uint64
- func (s *TestSuite) QueryBaseFee() sdk.Coins
- func (s *TestSuite) QueryParams() types.Params
- func (s *TestSuite) QueryState() types.State
- func (s *TestSuite) QueryValidators(chain *cosmos.CosmosChain) []sdk.ValAddress
- func (s *TestSuite) SendCoins(ctx context.Context, chain *cosmos.CosmosChain, ...) (string, error)
- func (s *TestSuite) SetupSubTest()
- func (s *TestSuite) SetupSuite()
- func (s *TestSuite) SimulateTx(ctx context.Context, user cosmos.User, height uint64, expectFail bool, ...)
- func (s *TestSuite) TearDownSuite()
- func (s *TestSuite) TestQueryBaseFee()
- func (s *TestSuite) TestQueryParams()
- func (s *TestSuite) TestQueryState()
- func (s *TestSuite) TestSendTxUpdating()
- func (s *TestSuite) VerifyBlock(block *rpctypes.ResultBlock, offset int, bidTxHash string, txs [][]byte)
- func (s *TestSuite) VerifyBlockWithExpectedBlock(chain *cosmos.CosmosChain, height uint64, txs [][]byte)
- func (s *TestSuite) WaitForHeight(chain *cosmos.CosmosChain, height uint64)
- func (s *TestSuite) WithDenom(denom string) *TestSuite
- func (s *TestSuite) WithKeyringOptions(cdc codec.Codec, opts keyring.Option)
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 ¶
ChainBuilderFromChainSpec creates an interchaintest chain builder factory given a ChainSpec and returns the associated chain
Types ¶
type KeyringOverride ¶
type KeyringOverride struct {
// contains filtered or unexported fields
}
type TestSuite ¶
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 ¶
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 (*TestSuite) QueryParams ¶
func (*TestSuite) QueryState ¶
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