Approval voting full subsystem tests (#3391)
* node/approval-voting: Introduce Backend trait and Overlaybackend This commit introduces a Backend trait and attempts to move away from the Action model via an OverlayBackend as in the ChainSelection subsystem. * node/approval-voting: Add WriteOps for StoredBlockRange and BlocksAtHeight * node/approval-voting: Add load_all_blocks to overlay * node/approval-voting: Get all module tests to pass. This commit modifies all tests to ensure tests are passing. * node/approval-voting: Address oversights in the previous commit This commit addresses some oversights in the prior commit. 1. Inner errors in backend.write were swallowed 2. One-off write functions removed to avoid useless abstraction 3. Touch-ups in general * node/approval-voting: Move from TestDB to dyn KeyValueDB This commit removes the TestDB from tests.rs and replaces it with an in-memory kvdb. * node/approval-voting: Address feedback * node/approval-voting: Add license to ops.rs * node/approval-voting: Address second-pass feedback * Add TODO * node/approval-voting: Bump spec_version * node/approval-voting: Address final comments. * node/approval-voting: Introduce framework for full subsystem tests * node/approval-voting: Introduce basic tests to attempt to provide coverage via full subsystem tests * node/approval-voting: Introduce Chainbuilder
Showing
- polkadot/Cargo.lock 1 addition, 0 deletionspolkadot/Cargo.lock
- polkadot/node/core/approval-voting/Cargo.toml 1 addition, 0 deletionspolkadot/node/core/approval-voting/Cargo.toml
- polkadot/node/core/approval-voting/src/import.rs 5 additions, 5 deletionspolkadot/node/core/approval-voting/src/import.rs
- polkadot/node/core/approval-voting/src/lib.rs 5 additions, 2 deletionspolkadot/node/core/approval-voting/src/lib.rs
- polkadot/node/core/approval-voting/src/old_tests.rs 1964 additions, 0 deletionspolkadot/node/core/approval-voting/src/old_tests.rs
- polkadot/node/core/approval-voting/src/tests.rs 911 additions, 1623 deletionspolkadot/node/core/approval-voting/src/tests.rs
Please register or sign in to comment