Skip to content

Commit

Permalink
pallet-staking: Put tests behind cfg(debug_assertions) (#4620)
Browse files Browse the repository at this point in the history
Otherwise these tests are failing if you don't run with
`debug_assertions` enabled, which happens if you run tests locally in
release mode.
  • Loading branch information
bkchr authored May 29, 2024
1 parent f4dc8d2 commit 4ab078d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions substrate/frame/staking/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5251,6 +5251,7 @@ mod election_data_provider {
// maybe_max_len`.
#[test]
#[should_panic]
#[cfg(debug_assertions)]
fn only_iterates_max_2_times_max_allowed_len() {
ExtBuilder::default()
.nominate(false)
Expand Down Expand Up @@ -5939,6 +5940,7 @@ fn min_commission_works() {

#[test]
#[should_panic]
#[cfg(debug_assertions)]
fn change_of_absolute_max_nominations() {
use frame_election_provider_support::ElectionDataProvider;
ExtBuilder::default()
Expand Down

0 comments on commit 4ab078d

Please sign in to comment.