mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 21:01:02 +00:00
[xcm-emulator] Unignore cumulus integration tests (#1247)
* tests should not be run with runtime-benchmarks feature
This commit is contained in:
@@ -89,4 +89,5 @@ pub fn system_para_test_args(
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
#[cfg(not(feature = "runtime-benchmarks"))]
|
||||
mod tests;
|
||||
|
||||
+62
-61
@@ -68,75 +68,76 @@ fn send_transact_sudo_from_relay_to_system_para_works() {
|
||||
/// Parachain should be able to send XCM paying its fee with sufficient asset
|
||||
/// in the System Parachain
|
||||
#[test]
|
||||
#[ignore]
|
||||
fn send_xcm_from_para_to_system_para_paying_fee_with_assets_works() {
|
||||
// let para_sovereign_account = AssetHubWestend::sovereign_account_id_of(
|
||||
// AssetHubWestend::sibling_location_of(PenpalWestendA::para_id()),
|
||||
// );
|
||||
let para_sovereign_account = AssetHubWestend::sovereign_account_id_of(
|
||||
AssetHubWestend::sibling_location_of(PenpalWestendA::para_id()),
|
||||
);
|
||||
|
||||
// // Force create and mint assets for Parachain's sovereign account
|
||||
// AssetHubWestend::force_create_and_mint_asset(
|
||||
// ASSET_ID,
|
||||
// ASSET_MIN_BALANCE,
|
||||
// true,
|
||||
// para_sovereign_account.clone(),
|
||||
// ASSET_MIN_BALANCE * 1000000000,
|
||||
// );
|
||||
// Force create and mint assets for Parachain's sovereign account
|
||||
AssetHubWestend::force_create_and_mint_asset(
|
||||
ASSET_ID,
|
||||
ASSET_MIN_BALANCE,
|
||||
true,
|
||||
para_sovereign_account.clone(),
|
||||
ASSET_MIN_BALANCE * 1000000000,
|
||||
);
|
||||
|
||||
// // We just need a call that can pass the `SafeCallFilter`
|
||||
// // Call values are not relevant
|
||||
// let call = AssetHubWestend::force_create_asset_call(
|
||||
// ASSET_ID,
|
||||
// para_sovereign_account.clone(),
|
||||
// true,
|
||||
// ASSET_MIN_BALANCE,
|
||||
// );
|
||||
// We just need a call that can pass the `SafeCallFilter`
|
||||
// Call values are not relevant
|
||||
let call = AssetHubWestend::force_create_asset_call(
|
||||
ASSET_ID,
|
||||
para_sovereign_account.clone(),
|
||||
true,
|
||||
ASSET_MIN_BALANCE,
|
||||
);
|
||||
|
||||
// let origin_kind = OriginKind::SovereignAccount;
|
||||
// let fee_amount = ASSET_MIN_BALANCE * 1000000;
|
||||
// let native_asset =
|
||||
// (X2(PalletInstance(ASSETS_PALLET_ID), GeneralIndex(ASSET_ID.into())), fee_amount).into();
|
||||
let origin_kind = OriginKind::SovereignAccount;
|
||||
let fee_amount = ASSET_MIN_BALANCE * 1000000;
|
||||
let native_asset =
|
||||
(X2(PalletInstance(ASSETS_PALLET_ID), GeneralIndex(ASSET_ID.into())), fee_amount).into();
|
||||
|
||||
// let root_origin = <PenpalWestendA as Chain>::RuntimeOrigin::root();
|
||||
// let system_para_destination =
|
||||
// PenpalWestendA::sibling_location_of(AssetHubWestend::para_id()).into();
|
||||
// let xcm = xcm_transact_paid_execution(
|
||||
// call,
|
||||
// origin_kind,
|
||||
// native_asset,
|
||||
// para_sovereign_account.clone(),
|
||||
// );
|
||||
let root_origin = <PenpalWestendA as Chain>::RuntimeOrigin::root();
|
||||
let system_para_destination =
|
||||
PenpalWestendA::sibling_location_of(AssetHubWestend::para_id()).into();
|
||||
let xcm = xcm_transact_paid_execution(
|
||||
call,
|
||||
origin_kind,
|
||||
native_asset,
|
||||
para_sovereign_account.clone(),
|
||||
);
|
||||
|
||||
// PenpalWestendA::execute_with(|| {
|
||||
// assert_ok!(<PenpalWestendA as PenpalWestendAPallet>::PolkadotXcm::send(
|
||||
// root_origin,
|
||||
// bx!(system_para_destination),
|
||||
// bx!(xcm),
|
||||
// ));
|
||||
PenpalWestendA::execute_with(|| {
|
||||
assert_ok!(<PenpalWestendA as PenpalWestendAPallet>::PolkadotXcm::send(
|
||||
root_origin,
|
||||
bx!(system_para_destination),
|
||||
bx!(xcm),
|
||||
));
|
||||
|
||||
// PenpalWestendA::assert_xcm_pallet_sent();
|
||||
// });
|
||||
PenpalWestendA::assert_xcm_pallet_sent();
|
||||
});
|
||||
|
||||
// AssetHubWestend::execute_with(|| {
|
||||
// type RuntimeEvent = <AssetHubWestend as Chain>::RuntimeEvent;
|
||||
PenpalWestendA::execute_with(|| {});
|
||||
|
||||
// AssetHubWestend::assert_xcmp_queue_success(Some(Weight::from_parts(
|
||||
// 2_176_414_000,
|
||||
// 203_593,
|
||||
// )));
|
||||
AssetHubWestend::execute_with(|| {
|
||||
type RuntimeEvent = <AssetHubWestend as Chain>::RuntimeEvent;
|
||||
|
||||
// assert_expected_events!(
|
||||
// AssetHubWestend,
|
||||
// vec![
|
||||
// RuntimeEvent::Assets(pallet_assets::Event::Burned { asset_id, owner, balance }) => {
|
||||
// asset_id: *asset_id == ASSET_ID,
|
||||
// owner: *owner == para_sovereign_account,
|
||||
// balance: *balance == fee_amount,
|
||||
// },
|
||||
// RuntimeEvent::Assets(pallet_assets::Event::Issued { asset_id, .. }) => {
|
||||
// asset_id: *asset_id == ASSET_ID,
|
||||
// },
|
||||
// ]
|
||||
// );
|
||||
// });
|
||||
AssetHubWestend::assert_xcmp_queue_success(Some(Weight::from_parts(
|
||||
2_176_414_000,
|
||||
203_593,
|
||||
)));
|
||||
|
||||
assert_expected_events!(
|
||||
AssetHubWestend,
|
||||
vec![
|
||||
RuntimeEvent::Assets(pallet_assets::Event::Burned { asset_id, owner, balance }) => {
|
||||
asset_id: *asset_id == ASSET_ID,
|
||||
owner: *owner == para_sovereign_account,
|
||||
balance: *balance == fee_amount,
|
||||
},
|
||||
RuntimeEvent::Assets(pallet_assets::Event::Issued { asset_id, .. }) => {
|
||||
asset_id: *asset_id == ASSET_ID,
|
||||
},
|
||||
]
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
-2
@@ -187,7 +187,6 @@ fn limited_teleport_native_assets_from_relay_to_system_para_works() {
|
||||
/// Limited Teleport of native asset from System Parachain to Relay Chain
|
||||
/// should work when there is enough balance in Relay Chain's `CheckAccount`
|
||||
#[test]
|
||||
#[cfg(feature = "FIXME-IGNORED")] // <https://github.com/paritytech/cumulus/issues/3027>
|
||||
fn limited_teleport_native_assets_back_from_system_para_to_relay_works() {
|
||||
// Dependency - Relay Chain's `CheckAccount` should have enough balance
|
||||
limited_teleport_native_assets_from_relay_to_system_para_works();
|
||||
@@ -226,7 +225,6 @@ fn limited_teleport_native_assets_back_from_system_para_to_relay_works() {
|
||||
/// Limited Teleport of native asset from System Parachain to Relay Chain
|
||||
/// should't work when there is not enough balance in Relay Chain's `CheckAccount`
|
||||
#[test]
|
||||
#[cfg(feature = "FIXME-IGNORED")] // <https://github.com/paritytech/cumulus/issues/3027>
|
||||
fn limited_teleport_native_assets_from_system_para_to_relay_fails() {
|
||||
// Init values for Relay Chain
|
||||
let amount_to_send: Balance = ASSET_HUB_WESTEND_ED * 1000;
|
||||
|
||||
Reference in New Issue
Block a user