Kind of tests that run against a live chain!
Test suite that verifies the consistency of the onchain storage.
- Checkout the git tag of the runtime that you want to check
- run the tests again the default network of the specified runtime type:
cargo sanity-RUNTIME_TYPE
RUNTIME_TYPE
should be replaced by gdev
, gtest
or g1
.
You can choose to use another RPC endpoint by setting the environment variable WS_RPC_ENDPOINT
.
This is also the only way to test against a different network that the default one which is ws://localhost:9944
.
You can choose to use run the sanity tests against a specific block by setting the environment
variable AT_BLOCK_NUMBER
.
Be careful: this would require to use an archive node.
The code is in the file live-tests/tests/sanity_RUNTIME_TYPE.rs
There is 3 different parts:
- Runtime types definitions
- Collect storage data
- Verify consistency of collected data