Documentation ¶
Index ¶
- func Block(t *testing.T, chain *cosmos.CosmosChain, height int64) *rpctypes.ResultBlock
- func BuildPOBInterchain(t *testing.T, ctx context.Context, chain ibc.Chain) *interchaintest.Interchain
- func ChainBuilderFromChainSpec(t *testing.T, spec *interchaintest.ChainSpec) ibc.Chain
- func QueryAccountBalance(t *testing.T, chain ibc.Chain, address, denom string) int64
- func QueryAccountSequence(t *testing.T, chain *cosmos.CosmosChain, address string) uint64
- func QueryBuilderParams(t *testing.T, chain ibc.Chain) buildertypes.Params
- func TxHash(tx []byte) string
- func VerifyBlock(t *testing.T, block *rpctypes.ResultBlock, offset int, bidTxHash string, ...)
- func WaitForHeight(t *testing.T, chain *cosmos.CosmosChain, height uint64)
- type KeyringOverride
- type POBIntegrationTestSuite
- func (s *POBIntegrationTestSuite) BroadcastTxs(ctx context.Context, chain *cosmos.CosmosChain, msgsPerUser []Tx) [][]byte
- func (s *POBIntegrationTestSuite) CreateAuctionBidMsg(ctx context.Context, searcher cosmos.User, chain *cosmos.CosmosChain, ...) (*buildertypes.MsgAuctionBid, [][]byte)
- func (s *POBIntegrationTestSuite) CreateTx(ctx context.Context, chain *cosmos.CosmosChain, user cosmos.User, ...) []byte
- func (s *POBIntegrationTestSuite) SetupSubTest()
- func (s *POBIntegrationTestSuite) SetupSuite()
- func (s *POBIntegrationTestSuite) SimulateTx(ctx context.Context, chain *cosmos.CosmosChain, user cosmos.User, ...)
- func (s *POBIntegrationTestSuite) TearDownSuite()
- func (s *POBIntegrationTestSuite) TestInvalidBids()
- func (s *POBIntegrationTestSuite) TestMultipleBids()
- func (s *POBIntegrationTestSuite) TestQueryParams()
- func (s *POBIntegrationTestSuite) TestValidBids()
- func (s *POBIntegrationTestSuite) WithDenom(denom string) *POBIntegrationTestSuite
- func (s *POBIntegrationTestSuite) WithKeyringOptions(cdc codec.Codec, opts keyring.Option)
- type Tx
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Block ¶
func Block(t *testing.T, chain *cosmos.CosmosChain, height int64) *rpctypes.ResultBlock
Block returns the block at the given height
func BuildPOBInterchain ¶
func BuildPOBInterchain(t *testing.T, ctx context.Context, chain ibc.Chain) *interchaintest.Interchain
BuildPOBInterchain creates a new Interchain testing env with the configured POB CosmosChain
func ChainBuilderFromChainSpec ¶
ChainBuilderFromChainSpec creates an interchaintest chain builder factory given a ChainSpec and returns the associated chain
func QueryAccountBalance ¶
QueryAccountBalance queries a given account's balance on the chain
func QueryAccountSequence ¶
QueryAccountSequence
func QueryBuilderParams ¶
QueryBuilderParams queries the x/builder module's params
func VerifyBlock ¶
func VerifyBlock(t *testing.T, 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 WaitForHeight ¶
func WaitForHeight(t *testing.T, chain *cosmos.CosmosChain, height uint64)
WaitForHeight waits for the chain to reach the given height
Types ¶
type KeyringOverride ¶ added in v0.2.0
type KeyringOverride struct {
// contains filtered or unexported fields
}
type POBIntegrationTestSuite ¶
POBIntegrationTestSuite runs the POB integration test-suite against a given interchaintest specification
func NewPOBIntegrationTestSuiteFromSpec ¶
func NewPOBIntegrationTestSuiteFromSpec(spec *interchaintest.ChainSpec) *POBIntegrationTestSuite
func (*POBIntegrationTestSuite) BroadcastTxs ¶ added in v0.2.0
func (s *POBIntegrationTestSuite) BroadcastTxs(ctx context.Context, chain *cosmos.CosmosChain, msgsPerUser []Tx) [][]byte
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 (*POBIntegrationTestSuite) CreateAuctionBidMsg ¶ added in v0.2.0
func (s *POBIntegrationTestSuite) CreateAuctionBidMsg(ctx context.Context, searcher cosmos.User, chain *cosmos.CosmosChain, bid sdk.Coin, users []Tx) (*buildertypes.MsgAuctionBid, [][]byte)
CreateAuctionBidMsg creates a new AuctionBid tx signed by the given user, the order of txs in the MsgAuctionBid will be determined by the contents + order of the MessageForUsers
func (*POBIntegrationTestSuite) CreateTx ¶ added in v0.2.0
func (s *POBIntegrationTestSuite) CreateTx(ctx context.Context, chain *cosmos.CosmosChain, user cosmos.User, seqIncrement, height uint64, msgs ...sdk.Msg) []byte
CreateTx creates a new transaction to be signed by the given user, including a provided set of messages
func (*POBIntegrationTestSuite) SetupSubTest ¶
func (s *POBIntegrationTestSuite) SetupSubTest()
func (*POBIntegrationTestSuite) SetupSuite ¶
func (s *POBIntegrationTestSuite) SetupSuite()
func (*POBIntegrationTestSuite) SimulateTx ¶ added in v0.2.0
func (s *POBIntegrationTestSuite) 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 (*POBIntegrationTestSuite) TearDownSuite ¶
func (s *POBIntegrationTestSuite) TearDownSuite()
func (*POBIntegrationTestSuite) TestInvalidBids ¶
func (s *POBIntegrationTestSuite) TestInvalidBids()
func (*POBIntegrationTestSuite) TestMultipleBids ¶
func (s *POBIntegrationTestSuite) TestMultipleBids()
TestMultipleBids tests the execution of various valid auction bids in the same block. There are a few invariants that are tested:
- The order of transactions in a bundle is preserved when bids are valid.
- All transactions execute as expected.
- The balance of the escrow account should be updated correctly.
- Top of block bids will be included in block proposals before other transactions that are included in the same block.
- If there is a block that has multiple valid bids with timeouts that are sufficiently far apart, the bids should be executed respecting the highest bids until the timeout is reached.
func (*POBIntegrationTestSuite) TestQueryParams ¶
func (s *POBIntegrationTestSuite) TestQueryParams()
func (*POBIntegrationTestSuite) TestValidBids ¶
func (s *POBIntegrationTestSuite) TestValidBids()
TestValidBids tests the execution of various valid auction bids. There are a few invariants that are tested:
- The order of transactions in a bundle is preserved when bids are valid.
- All transactions execute as expected.
- The balance of the escrow account should be updated correctly.
- Top of block bids will be included in block proposals before other transactions
func (*POBIntegrationTestSuite) WithDenom ¶
func (s *POBIntegrationTestSuite) WithDenom(denom string) *POBIntegrationTestSuite
func (*POBIntegrationTestSuite) WithKeyringOptions ¶ added in v0.2.0
func (s *POBIntegrationTestSuite) WithKeyringOptions(cdc codec.Codec, opts keyring.Option)