Documentation
¶
Overview ¶
Package base implements the E2E tests for the basic SDK functionality.
Index ¶
- Constants
- Variables
- func BlockQueryTest(ctx context.Context, env *scenario.Env) error
- func ConfidentialTest(ctx context.Context, env *scenario.Env) error
- func GenKVGet1(ctx context.Context, rtc client.RuntimeClient, _ *rand.Rand, ...) (*types.Transaction, error)
- func GenKVGet2(ctx context.Context, rtc client.RuntimeClient, rng *rand.Rand, ...) (*types.Transaction, error)
- func GenKVInsert1(_ context.Context, _ client.RuntimeClient, rng *rand.Rand, ...) (*types.Transaction, error)
- func GenKVInsert2(_ context.Context, _ client.RuntimeClient, rng *rand.Rand, _ signature.Signer, ...) (*types.Transaction, error)
- func GenKVRemove1(_ context.Context, _ client.RuntimeClient, _ *rand.Rand, acct signature.Signer, ...) (*types.Transaction, error)
- func GenKVRemove2(_ context.Context, _ client.RuntimeClient, rng *rand.Rand, _ signature.Signer, ...) (*types.Transaction, error)
- func GetChainContext(ctx context.Context, rtc client.RuntimeClient) (signature.Context, error)
- func IntrospectionTest(ctx context.Context, env *scenario.Env) error
- func KVBalanceTest(ctx context.Context, env *scenario.Env) error
- func KVDaveTest(ctx context.Context, env *scenario.Env) error
- func KVEventTest(ctx context.Context, env *scenario.Env) error
- func KVMultisigTest(ctx context.Context, env *scenario.Env) error
- func KVRewardsTest(ctx context.Context, env *scenario.Env) error
- func KVTransferFailTest(ctx context.Context, env *scenario.Env) error
- func KVTransferTest(ctx context.Context, env *scenario.Env) error
- func KVTxGenTest(ctx context.Context, env *scenario.Env) error
- func ParametersTest(ctx context.Context, env *scenario.Env) error
- func SimpleKVTest(ctx context.Context, env *scenario.Env) error
- func TransactionCheckTest(ctx context.Context, env *scenario.Env) error
- func TransactionsQueryTest(ctx context.Context, env *scenario.Env) error
Constants ¶
const EventWaitTimeout = 20 * time.Second
EventWaitTimeout specifies how long to wait for an event.
Variables ¶
var DefaultKVTxGenerators = []txgen.GenerateTx{ GenKVInsert1, GenKVInsert2, GenKVGet1, GenKVGet2, GenKVRemove1, GenKVRemove2, }
DefaultKVTxGenerators is the default set of transaction generators for the simple keyvalue runtime.
var Runtime = scenario.NewRuntimeScenario("test-runtime-simple-keyvalue", []scenario.RunTestFunction{ SimpleKVTest, KVEventTest, KVBalanceTest, KVTransferTest, KVTransferFailTest, KVDaveTest, KVMultisigTest, KVRewardsTest, KVTxGenTest, ConfidentialTest, TransactionsQueryTest, BlockQueryTest, ParametersTest, IntrospectionTest, TransactionCheckTest, })
Runtime is the basic network + client test case with runtime support.
Functions ¶
func BlockQueryTest ¶
BlockQueryTest tests block queries.
func ConfidentialTest ¶
ConfidentialTest tests functions that require a key manager.
func GenKVGet1 ¶
func GenKVGet1(ctx context.Context, rtc client.RuntimeClient, _ *rand.Rand, acct signature.Signer, _ []signature.Signer) (*types.Transaction, error)
GenKVGet1 generates a Get query for the keyvalue runtime. The account's public key is used as the key.
func GenKVGet2 ¶
func GenKVGet2(ctx context.Context, rtc client.RuntimeClient, rng *rand.Rand, _ signature.Signer, _ []signature.Signer) (*types.Transaction, error)
GenKVGet2 generates a Get query for the keyvalue runtime. The key is random.
func GenKVInsert1 ¶
func GenKVInsert1(_ context.Context, _ client.RuntimeClient, rng *rand.Rand, acct signature.Signer, _ []signature.Signer) (*types.Transaction, error)
GenKVInsert1 generates an Insert transaction for the keyvalue runtime. The account's public key is used as the key and the value is random.
func GenKVInsert2 ¶
func GenKVInsert2(_ context.Context, _ client.RuntimeClient, rng *rand.Rand, _ signature.Signer, _ []signature.Signer) (*types.Transaction, error)
GenKVInsert2 generates an Insert transaction for the keyvalue runtime. The key and value are random.
func GenKVRemove1 ¶
func GenKVRemove1(_ context.Context, _ client.RuntimeClient, _ *rand.Rand, acct signature.Signer, _ []signature.Signer) (*types.Transaction, error)
GenKVRemove1 generates a Remove transaction for the keyvalue runtime. The account's public key is used as the key.
func GenKVRemove2 ¶
func GenKVRemove2(_ context.Context, _ client.RuntimeClient, rng *rand.Rand, _ signature.Signer, _ []signature.Signer) (*types.Transaction, error)
GenKVRemove2 generates a Remove transaction for the keyvalue runtime. The key is random.
func GetChainContext ¶
GetChainContext returns the chain context.
func KVBalanceTest ¶
KVBalanceTest checks test accounts' default balances.
func KVDaveTest ¶
KVDaveTest does a tx signing test using the secp256k1 signer.
func KVEventTest ¶
KVEventTest tests key insert/remove events.
func KVTransferFailTest ¶
KVTransferFailTest does a failing transfer test.
func KVTransferTest ¶
KVTransferTest does a transfer test and verifies balances.
func KVTxGenTest ¶
KVTxGenTest generates random transactions.
func ParametersTest ¶
ParametersTest tests parameters methods.
func SimpleKVTest ¶
SimpleKVTest does a simple key insert/fetch/remove test.
func TransactionCheckTest ¶
TransactionCheckTest checks that nonce/fee are correctly taken into account during tx checks.
Types ¶
This section is empty.