You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We should support writing procedural style VM tests that assume only an injected dependency for how to issue and confirm txs and get the URIs of the HyperSDK server for each available node, so that we can send API requests and confirm the state of the chain as needed.
This should replace NewWorkloads(...) with a format that looks like:
And allows users to write their tests in a procedural format like:
funcexecuteTest(vmTestNetwork) {
uris:=vm.URIs()
// Step 1vm.ConfirmTxs([]*chain.Transaction{})
client:=indexer.NewClient(uris[0])
_=client// Perform some API calls to confirm the state of the chain// Step 2vm.ConfirmTxs([]*chain.Transaction{})
// Step 3vm.ConfirmTxs([]*chain.Transaction{})
}
Return a TestNetwork interface from the environment setup function and execute tests against it
Create a TestRegistry that allows users to register each of their test functions and then executes the registry in the existing integration.go / e2e.go files
We'll need to implement TestNetwork in both e2e (issue via jsonrpc API and confirm with tx indexer) and integration (issue via vm.Submit and confirm either via indexer API or checking the block contents directly) environments.
Line: 21
hypersdk/tests/workload/transactions.go
Lines 18 to 28 in d1f9713
The text was updated successfully, but these errors were encountered: