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
{{ message }}
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
TryState: automatically execute after each migration #12130
changed the title [-]`TryState`: automatically execute after each mogration[/-][+]`TryState`: automatically execute after each migration[/+]on Aug 29, 2022
Activity
[-]`TryState`: automatically execute after each mogration[/-][+]`TryState`: automatically execute after each migration[/+]kianenigma commentedon Oct 11, 2022
wild dream: have a standard testing framework, call it automatically after each TEST.
kianenigma commentedon Oct 18, 2022
To achieve executing this after each test:
have a new macro
construct_runtime_with_ext_builder.This generates, per pallet (e.g. staking)
GenesisBuild, a structStakingBuilder { genesis_field_1, genesis_filed_2, .. }typeinConfigthat'sGet<u32>, aparameter_types! { static Config1: _ = .., Config2: _ = .. }setterfunctions for all of the above.lastly, it implements functions such as
buildandexecute_withonRuntime, so at the end we would do:in each test.
and this
Runtime::execute_withwould executetry_state()of the pallet after each test.I really like this idea. It solves legacy issues like paritytech/polkadot-sdk#367. The shitty thing about this is more hidden code, more magic, flying in the face of paritytech/polkadot-sdk#32.