Sanity tests

Sanity tests are a great tool for debugging the blockchain state. Running them automatically can allow to catch a problem early before it becomes too difficult to manage.

To run sanity tests locally on the gdev, use

WS_RPC_ENDPOINT=wss://gdev.trentesaux.fr:443/ws cargo sanity-gdev

(you can use a custom rpc endpoint)

Example use : https://git.duniter.org/nodes/rust/duniter-v2s/-/issues/85

We should list the coverage we want for sanity tests and implement them early in the migration process.

2 Likes

We have to check the consistency of the data of all the storage items of all the pallets, for the moment we check very few, if someone wants to list them, just look at all the occurrences of ::storage in our codebase and in substrate pallets that we use.

The sanity tests are played every 24 hours by a scheduled pipeline on gitlab against my RPC node, and I get an email when they fails.

1 Like