E2E Testing for On-Chain Data
bvrooman opened this issue · comments
Brandon Vrooman commented
General test outline:
- Setup the resource data to a known state on the node
- Run regenesis on the node
- Query the node for the resource state
- Compare the resource state after regenesis to the known state
- If the states are equal, the tests pass; otherwise, the tests fail
Criteria:
- E2E test to confirm that contract states are consistent before and after regenesis (https://github.com/FuelLabs/fuel-core-regenesis/pull/1)
- E2E test to confirm that contract balances are consistent before and after regenesis
- Currently support base asset (https://github.com/FuelLabs/fuel-core-regenesis/pull/8)
- Do we need other assets?
- E2E test to confirm that coins are consistent before and after regenesis (https://github.com/FuelLabs/fuel-core-regenesis/pull/8)
- E2E test to confirm that messages are consistent before and after regenesis (https://github.com/FuelLabs/fuel-core-regenesis/pull/8)
Aftermath testing:
- Test that all tables are consistent before and after regenesis via API calls
- Blocks, contract balances, coins, messages
- Process
- Get the resource via API call
- Perform regenesis
- Get the resource via API call again
- Compare