Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Workload Test Framework Improvements #1792

Open
aaronbuchwald opened this issue Nov 17, 2024 · 1 comment
Open

Workload Test Framework Improvements #1792

aaronbuchwald opened this issue Nov 17, 2024 · 1 comment

Comments

@aaronbuchwald
Copy link
Collaborator

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.

@najeal
Copy link
Contributor

najeal commented Nov 19, 2024

This will be done is different PR:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants