Skip to content

Workload Test Framework Improvements #1792

Open
@aaronbuchwald

Description

@aaronbuchwald

Feedback from @furkan-ux :

  • Add examples of how to interact with URIs of the test network
  • the test network interface is confusing - it's unclear from the interface how to extract the spending key, generate transactions, and get started
  • ConfirmTxs is confusing because it implies that everything about the transaction execution will be checked for you

TODO:

  • Add example of interacting with URIs to MorpheusVM transfer workload test
  • Add transaction execution result to the return type of ConfirmTxs to ConfirmTxs(context.Context, []*chain.Transaction) ([]*chain.Result, error) and update example to put it on the caller to confirm the expected result

We should make it easier to grab the private key to use during a workload test rather than casting the network configuration and then grabbing a private key from it. One idea is to add GetFundedKey() *auth.PrivateKey to the workload.TestNetwork interface that returns the pre-funded private key to use for the test. Tests can then distribute funds from this initial key as needed and won't need to cast the network configuration to their own type to extract the private key details. Instead, they can use the VM's AuthProvider to create an auth factory from the provided private key type.

Further improvements would be to add an argument to registry.RegisterTest to specify the minimum balance of the private key, so that the test runner can create isolated keys for each test and distribute the requested funds in the background.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions