Generate Unit Tests for Benchmarks (#5527)
* Update to latest staking * generate tests for benchmarking * add tests, fix warnings * starting on democracy * impl_benchmark_tests * Way more readable * add test feature flag (does this work?) * Fix `successful_origin` impl * democracry benchmark tests * Fix example benchmarks, add tests * identity benchmark tests * Update im-online benchmark tests * try to add session benchmarking tests (problem with mock) * staking and timestamp * add test for treasury, issue with dynamic contains * utility * Vesting * test instead of check * hide until we figure out what is wrong * add docs * close code * Create custom mock for session-pallet-benchmarking * Use refcell pattern * make un-pub * test-linux-stable includes `runtime-benchmarks` feature * Revert "test-linux-stable includes `runtime-benchmarks` feature" This reverts commit a2dab38abd18ac3eb8a6220e4a00e687740bd38c. * run tests in `--release` * undo balance change * build wasm
Showing
- substrate/.gitlab-ci.yml 1 addition, 1 deletionsubstrate/.gitlab-ci.yml
- substrate/Cargo.lock 9 additions, 0 deletionssubstrate/Cargo.lock
- substrate/frame/balances/src/benchmarking.rs 42 additions, 0 deletionssubstrate/frame/balances/src/benchmarking.rs
- substrate/frame/benchmarking/Cargo.toml 1 addition, 0 deletionssubstrate/frame/benchmarking/Cargo.toml
- substrate/frame/benchmarking/src/lib.rs 110 additions, 13 deletionssubstrate/frame/benchmarking/src/lib.rs
- substrate/frame/benchmarking/src/tests.rs 27 additions, 4 deletionssubstrate/frame/benchmarking/src/tests.rs
- substrate/frame/democracy/src/benchmarking.rs 41 additions, 0 deletionssubstrate/frame/democracy/src/benchmarking.rs
- substrate/frame/democracy/src/tests.rs 3 additions, 1 deletionsubstrate/frame/democracy/src/tests.rs
- substrate/frame/example/src/lib.rs 21 additions, 6 deletionssubstrate/frame/example/src/lib.rs
- substrate/frame/identity/src/benchmarking.rs 24 additions, 0 deletionssubstrate/frame/identity/src/benchmarking.rs
- substrate/frame/identity/src/lib.rs 1 addition, 1 deletionsubstrate/frame/identity/src/lib.rs
- substrate/frame/im-online/src/benchmarking.rs 5 additions, 36 deletionssubstrate/frame/im-online/src/benchmarking.rs
- substrate/frame/session/benchmarking/Cargo.toml 11 additions, 0 deletionssubstrate/frame/session/benchmarking/Cargo.toml
- substrate/frame/session/benchmarking/src/lib.rs 24 additions, 5 deletionssubstrate/frame/session/benchmarking/src/lib.rs
- substrate/frame/session/benchmarking/src/mock.rs 184 additions, 0 deletionssubstrate/frame/session/benchmarking/src/mock.rs
- substrate/frame/session/src/mock.rs 10 additions, 0 deletionssubstrate/frame/session/src/mock.rs
- substrate/frame/session/src/tests.rs 3 additions, 13 deletionssubstrate/frame/session/src/tests.rs
- substrate/frame/staking/src/benchmarking.rs 39 additions, 19 deletionssubstrate/frame/staking/src/benchmarking.rs
- substrate/frame/support/src/lib.rs 2 additions, 0 deletionssubstrate/frame/support/src/lib.rs
- substrate/frame/system/src/lib.rs 6 additions, 3 deletionssubstrate/frame/system/src/lib.rs
Please register or sign in to comment