Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
TarekkMA committed Sep 16, 2024
1 parent 71d1424 commit 2cb1e90
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pallets/moonbeam-lazy-migrations/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@ fn test_state_migration_can_fit_exactly_all_item() {

assert!(matches!(
StateMigrationStatusValue::<Test>::get(),
(StateMigrationStatus::Started(_), keys),
(StateMigrationStatus::Started(_), n) if n == keys,
));

// after calling on_idle status is added to the storage so we need to account for that
Expand All @@ -492,7 +492,7 @@ fn test_state_migration_can_fit_exactly_all_item() {

assert!(matches!(
StateMigrationStatusValue::<Test>::get(),
(StateMigrationStatus::Complete, new_keys),
(StateMigrationStatus::Complete, n) if n == new_keys,
));
})
}
Expand Down Expand Up @@ -548,15 +548,15 @@ fn test_state_migration_will_migrate_10_000_items() {
if i < needed_on_idle_calls {
let migrated_so_far = i * entries_per_on_idle;
assert!(
matches!(status, (StateMigrationStatus::Started(_), migrated_so_far)),
matches!(status, (StateMigrationStatus::Started(_), n) if n == migrated_so_far),
"Status: {:?} at call: #{} doesn't match Started",
status,
i,
);
assert!(weight.all_gte(weight_for(1, 0)));
} else {
assert!(
matches!(status, (StateMigrationStatus::Complete, keys)),
matches!(status, (StateMigrationStatus::Complete, n) if n == keys),
"Status: {:?} at call: {} doesn't match Complete",
status,
i,
Expand Down

0 comments on commit 2cb1e90

Please sign in to comment.