Documentation ¶
Index ¶
- type AnteTestSuite
- func (suite *AnteTestSuite) CreateTestAccounts(numAccs int) []TestAccount
- func (suite *AnteTestSuite) CreateTestTx(privs []cryptotypes.PrivKey, accNums []uint64, accSeqs []uint64, ...) (xauthsigning.Tx, error)
- func (suite *AnteTestSuite) DeliverMsgs(t *testing.T, privs []cryptotypes.PrivKey, msgs []sdk.Msg, feeAmount sdk.Coins, ...) (sdk.Context, error)
- func (suite *AnteTestSuite) RunTestCase(t *testing.T, tc TestCase, args TestCaseArgs)
- type TestAccount
- type TestCase
- type TestCaseArgs
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AnteTestSuite ¶
type AnteTestSuite struct { AnteHandler sdk.AnteHandler Ctx sdk.Context ClientCtx client.Context TxBuilder client.TxBuilder AccountKeeper keeper.AccountKeeper BankKeeper *authtestutil.MockBankKeeper FeeGrantKeeper *antetestutil.MockFeegrantKeeper EncCfg moduletestutil.TestEncodingConfig }
AnteTestSuite is a test suite to be used with ante handler tests.
func SetupTestSuite ¶
func SetupTestSuite(t *testing.T, isCheckTx bool) *AnteTestSuite
SetupTest setups a new test, with new app, context, and AnteHandler.
func (*AnteTestSuite) CreateTestAccounts ¶
func (suite *AnteTestSuite) CreateTestAccounts(numAccs int) []TestAccount
func (*AnteTestSuite) CreateTestTx ¶
func (suite *AnteTestSuite) CreateTestTx( privs []cryptotypes.PrivKey, accNums []uint64, accSeqs []uint64, chainID string, ) (xauthsigning.Tx, error)
CreateTestTx is a helper function to create a tx given multiple inputs.
func (*AnteTestSuite) DeliverMsgs ¶
func (suite *AnteTestSuite) DeliverMsgs( t *testing.T, privs []cryptotypes.PrivKey, msgs []sdk.Msg, feeAmount sdk.Coins, gasLimit uint64, accNums, accSeqs []uint64, chainID string, simulate bool, ) (sdk.Context, error)
DeliverMsgs constructs a tx and runs it through the ante handler. This is used to set the context for a test case, for example to test for replay protection.
func (*AnteTestSuite) RunTestCase ¶
func (suite *AnteTestSuite) RunTestCase(t *testing.T, tc TestCase, args TestCaseArgs)
type TestAccount ¶
type TestAccount struct {
// contains filtered or unexported fields
}
TestAccount represents an account used in the tests in x/auth/ante.
type TestCase ¶
type TestCase struct {
// contains filtered or unexported fields
}
TestCase represents a test case used in test tables.
type TestCaseArgs ¶
type TestCaseArgs struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.