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 RandLowerCaseLetterString(length int) string
- func TxHash(tx []byte) string
- type KeyringOverride
- type TestSuite
- func (s *TestSuite) Block(chain *cosmos.CosmosChain, height int64) *rpctypes.ResultBlock
- func (s *TestSuite) BroadcastTxs(ctx context.Context, chain *cosmos.CosmosChain, txs []Tx) [][]byte
- func (s *TestSuite) BroadcastTxsWithCallback(ctx context.Context, chain *cosmos.CosmosChain, txs []Tx, ...) [][]byte
- func (s *TestSuite) CreateTx(ctx context.Context, chain *cosmos.CosmosChain, user cosmos.User, ...) []byte
- 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) QueryParams() types.Params
- func (s *TestSuite) QueryValidators(chain *cosmos.CosmosChain) []sdk.ValAddress
- func (s *TestSuite) SetupSubTest()
- func (s *TestSuite) SetupSuite()
- func (s *TestSuite) SimulateTx(ctx context.Context, chain *cosmos.CosmosChain, user cosmos.User, ...)
- func (s *TestSuite) TearDownSuite()
- func (s *TestSuite) TestQueryParams()
- 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)
- type Tx
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildInterchain ¶
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
func RandLowerCaseLetterString ¶
RandLowerCaseLetterString returns a lowercase letter string of given length
Types ¶
type KeyringOverride ¶
type KeyringOverride struct {
// contains filtered or unexported fields
}
type TestSuite ¶
TestSuite runs the feemarket integration test-suite against a given interchaintest specification
func NewIntegrationTestSuiteFromSpec ¶
func NewIntegrationTestSuiteFromSpec(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) BroadcastTxs ¶
BroadcastTxs broadcasts the given messages for each user. This function returns the broadcasted txs. If a message is not expected to be included in a block, set SkipInclusionCheck to true and the method will not block on the tx's inclusion in a block, otherwise this method will block on the tx's inclusion
func (*TestSuite) BroadcastTxsWithCallback ¶
func (s *TestSuite) BroadcastTxsWithCallback( ctx context.Context, chain *cosmos.CosmosChain, txs []Tx, cb func(tx []byte, resp *rpctypes.ResultTx), ) [][]byte
BroadcastTxsWithCallback broadcasts the given messages for each user. This function returns the broadcasted txs. If a message is not expected to be included in a block, set SkipInclusionCheck to true and the method will not block on the tx's inclusion in a block, otherwise this method will block on the tx's inclusion. The callback function is called for each tx that is included in a block.
func (*TestSuite) CreateTx ¶
func (s *TestSuite) CreateTx(ctx context.Context, chain *cosmos.CosmosChain, user cosmos.User, seqIncrement, height uint64, GasPrice int64, msgs ...sdk.Msg) []byte
CreateTx creates a new transaction to be signed by the given user, including a provided set of messages
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) QueryParams ¶
func (*TestSuite) QueryValidators ¶
func (s *TestSuite) QueryValidators(chain *cosmos.CosmosChain) []sdk.ValAddress
QueryValidators queries for all the network's validators
func (*TestSuite) SetupSubTest ¶
func (s *TestSuite) SetupSubTest()
func (*TestSuite) SetupSuite ¶
func (s *TestSuite) SetupSuite()
func (*TestSuite) SimulateTx ¶
func (s *TestSuite) SimulateTx(ctx context.Context, chain *cosmos.CosmosChain, 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) TestQueryParams ¶
func (s *TestSuite) TestQueryParams()
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