Skip to content

Commit 4ab078d

Browse files
authored
pallet-staking: Put tests behind cfg(debug_assertions) (#4620)
Otherwise these tests are failing if you don't run with `debug_assertions` enabled, which happens if you run tests locally in release mode.
1 parent f4dc8d2 commit 4ab078d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

substrate/frame/staking/src/tests.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5251,6 +5251,7 @@ mod election_data_provider {
52515251
// maybe_max_len`.
52525252
#[test]
52535253
#[should_panic]
5254+
#[cfg(debug_assertions)]
52545255
fn only_iterates_max_2_times_max_allowed_len() {
52555256
ExtBuilder::default()
52565257
.nominate(false)
@@ -5939,6 +5940,7 @@ fn min_commission_works() {
59395940

59405941
#[test]
59415942
#[should_panic]
5943+
#[cfg(debug_assertions)]
59425944
fn change_of_absolute_max_nominations() {
59435945
use frame_election_provider_support::ElectionDataProvider;
59445946
ExtBuilder::default()

0 commit comments

Comments
 (0)