Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
Signed-off-by: Jamie <djptux@gmail.com>
  • Loading branch information
Dengjianping committed May 13, 2024
1 parent 6d5d83b commit 82f8674
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions runtime/integration-tests/src/xcm_mock/xcm_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2274,10 +2274,10 @@ fn test_versioning_on_runtime_upgrade_with_relay() {
let relay_asset_metadata = create_asset_metadata("Kusama", "KSM", 12, 1, false, true);
let para_a_asset_metadata = create_asset_metadata("ParaA", "ParaA", 12, 1, false, true);

// register relay asset in parachain A (XCM version 2)
// register relay asset in parachain A (XCM version 1)
ParaA::execute_with(|| {
// SelfReserve
parachain::set_current_xcm_version(2);
parachain::set_current_xcm_version(1);
});
let _ = register_assets_on_parachain::<ParaA>(
&para_a_source_location,
Expand All @@ -2292,7 +2292,7 @@ fn test_versioning_on_runtime_upgrade_with_relay() {
None,
);

let response = Response::Version(4);
let response = Response::Version(3);

// This is irrelevant, nothing will be done with this message,
// but we need to pass a message as an argument to trigger the storage change
Expand Down Expand Up @@ -2348,7 +2348,7 @@ fn test_versioning_on_runtime_upgrade_with_relay() {
parents: 0,
interior: X1(Parachain(PARA_A_ID)),
},
version: 2,
version: 1,
}
.into();

Expand All @@ -2357,11 +2357,11 @@ fn test_versioning_on_runtime_upgrade_with_relay() {
assert!(relay_chain::relay_events().contains(&expected_supported_version));
});

// ParaA changes version to 3, and calls on_runtime_upgrade. This should notify the targets
// ParaA changes version to 2, and calls on_runtime_upgrade. This should notify the targets
// of the new version change
ParaA::execute_with(|| {
// Set version
parachain::set_current_xcm_version(3);
parachain::set_current_xcm_version(2);
// Do runtime upgrade
parachain::on_runtime_upgrade();
// Initialize block, to call on_initialize and notify targets
Expand All @@ -2386,7 +2386,7 @@ fn test_versioning_on_runtime_upgrade_with_relay() {
parents: 0,
interior: X1(Parachain(PARA_A_ID)),
},
version: 2,
version: 1,
}
.into();

Expand Down Expand Up @@ -2436,7 +2436,7 @@ fn test_automatic_versioning_on_runtime_upgrade_with_para_b() {

ParaB::execute_with(|| {
// advertised version
parachain::set_current_xcm_version(2);
parachain::set_current_xcm_version(0);
});

let _ = register_assets_on_parachain::<ParaB>(
Expand Down Expand Up @@ -2476,7 +2476,7 @@ fn test_automatic_versioning_on_runtime_upgrade_with_para_b() {
parents: 1,
interior: X1(Parachain(PARA_B_ID)),
},
version: 2,
version: 0,
}
.into();

Expand Down Expand Up @@ -2547,7 +2547,7 @@ fn test_automatic_versioning_on_runtime_upgrade_with_para_b() {
parents: 1,
interior: X1(Parachain(PARA_B_ID)),
},
version: 2,
version: 0,
}
.into();

Expand Down Expand Up @@ -3623,4 +3623,4 @@ fn send_disabled_asset_should_fail() {
&para_b_source_location.into()
),)
});
}
}

0 comments on commit 82f8674

Please sign in to comment.