Skip to content

Commit

Permalink
pallet-staking: Put tests behind cfg(debug_assertions) (paritytech#…
Browse files Browse the repository at this point in the history
…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.
  • Loading branch information
bkchr authored and TarekkMA committed Aug 2, 2024
1 parent bfd89f6 commit b20831f
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 b20831f

Please sign in to comment.