difftreelog
refactor xcm transact forbidden test
in: master
17 files changed
runtime/common/tests/mod.rsdiffbeforeafterboth1// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.2// This file is part of Unique Network.34// Unique Network is free software: you can redistribute it and/or modify5// it under the terms of the GNU General Public License as published by6// the Free Software Foundation, either version 3 of the License, or7// (at your option) any later version.89// Unique Network is distributed in the hope that it will be useful,10// but WITHOUT ANY WARRANTY; without even the implied warranty of11// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the12// GNU General Public License for more details.1314// You should have received a copy of the GNU General Public License15// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.1617use sp_runtime::BuildStorage;18use sp_core::{Public, Pair};19use sp_std::vec;20use up_common::types::AuraId;21use crate::{GenesisConfig, ParachainInfoConfig};2223pub mod xcm;2425fn get_from_seed<TPublic: Public>(seed: &str) -> <TPublic::Pair as Pair>::Public {26 TPublic::Pair::from_string(&format!("//{}", seed), None)27 .expect("static values are valid; qed")28 .public()29}3031#[cfg(feature = "collator-selection")]32fn new_test_ext(para_id: u32) -> sp_io::TestExternalities {33 use sp_core::{sr25519};34 use sp_runtime::traits::{IdentifyAccount, Verify};35 use crate::{AccountId, Signature, SessionKeys, CollatorSelectionConfig, SessionConfig};3637 type AccountPublic = <Signature as Verify>::Signer;3839 fn get_account_id_from_seed<TPublic: Public>(seed: &str) -> AccountId40 where41 AccountPublic: From<<TPublic::Pair as Pair>::Public>,42 {43 AccountPublic::from(get_from_seed::<TPublic>(seed)).into_account()44 }4546 let accounts = vec!["Alice", "Bob"];47 let keys = accounts48 .iter()49 .map(|&acc| {50 let account_id = get_account_id_from_seed::<sr25519::Public>(acc);51 (52 account_id.clone(),53 account_id,54 SessionKeys {55 aura: get_from_seed::<AuraId>(acc),56 },57 )58 })59 .collect::<Vec<_>>();60 let invulnerables = accounts61 .iter()62 .map(|acc| get_account_id_from_seed::<sr25519::Public>(acc))63 .collect::<Vec<_>>();6465 let cfg = GenesisConfig {66 collator_selection: CollatorSelectionConfig { invulnerables },67 session: SessionConfig { keys },68 parachain_info: ParachainInfoConfig {69 parachain_id: para_id.into(),70 },71 ..GenesisConfig::default()72 };7374 cfg.build_storage().unwrap().into()75}7677#[cfg(not(feature = "collator-selection"))]78fn new_test_ext(para_id: u32) -> sp_io::TestExternalities {79 use crate::AuraConfig;8081 let cfg = GenesisConfig {82 aura: AuraConfig {83 authorities: vec![84 get_from_seed::<AuraId>("Alice"),85 get_from_seed::<AuraId>("Bob"),86 ],87 },88 parachain_info: ParachainInfoConfig {89 parachain_id: para_id.into(),90 },91 ..GenesisConfig::default()92 };9394 cfg.build_storage().unwrap().into()95}1// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.2// This file is part of Unique Network.34// Unique Network is free software: you can redistribute it and/or modify5// it under the terms of the GNU General Public License as published by6// the Free Software Foundation, either version 3 of the License, or7// (at your option) any later version.89// Unique Network is distributed in the hope that it will be useful,10// but WITHOUT ANY WARRANTY; without even the implied warranty of11// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the12// GNU General Public License for more details.1314// You should have received a copy of the GNU General Public License15// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.1617use sp_runtime::{BuildStorage, Storage};18use sp_core::{Public, Pair};19use sp_std::vec;20use up_common::types::AuraId;21use crate::{Runtime, GenesisConfig, ParachainInfoConfig, RuntimeEvent, System};2223pub use sp_runtime::AccountId32 as AccountId;24pub type Balance = u128;2526pub mod xcm;2728#[cfg(any(feature = "opal-runtime", feature = "quartz-runtime"))]29/// PARA_ID for Opal/Sapphire/Quartz30const PARA_ID: u32 = 2095;3132#[cfg(feature = "unique-runtime")]33/// PARA_ID for Unique34const PARA_ID: u32 = 2037;3536fn get_from_seed<TPublic: Public>(seed: &str) -> <TPublic::Pair as Pair>::Public {37 TPublic::Pair::from_string(&format!("//{}", seed), None)38 .expect("static values are valid; qed")39 .public()40}4142fn last_events(n: usize) -> Vec<RuntimeEvent> {43 System::events().into_iter().map(|e| e.event).rev().take(n).rev().collect()44}4546fn new_test_ext(balances: Vec<(AccountId, Balance)>) -> sp_io::TestExternalities {47 let mut storage = make_basic_storage();4849 pallet_balances::GenesisConfig::<Runtime> { balances }50 .assimilate_storage(&mut storage)51 .unwrap();5253 let mut ext = sp_io::TestExternalities::new(storage);54 ext.execute_with(|| System::set_block_number(1));55 ext56}5758#[cfg(feature = "collator-selection")]59fn make_basic_storage() -> Storage {60 use sp_core::{sr25519};61 use sp_runtime::traits::{IdentifyAccount, Verify};62 use crate::{AccountId, Signature, SessionKeys, CollatorSelectionConfig, SessionConfig};6364 type AccountPublic = <Signature as Verify>::Signer;6566 fn get_account_id_from_seed<TPublic: Public>(seed: &str) -> AccountId67 where68 AccountPublic: From<<TPublic::Pair as Pair>::Public>,69 {70 AccountPublic::from(get_from_seed::<TPublic>(seed)).into_account()71 }7273 let accounts = vec!["Alice", "Bob"];74 let keys = accounts75 .iter()76 .map(|&acc| {77 let account_id = get_account_id_from_seed::<sr25519::Public>(acc);78 (79 account_id.clone(),80 account_id,81 SessionKeys {82 aura: get_from_seed::<AuraId>(acc),83 },84 )85 })86 .collect::<Vec<_>>();87 let invulnerables = accounts88 .iter()89 .map(|acc| get_account_id_from_seed::<sr25519::Public>(acc))90 .collect::<Vec<_>>();9192 let cfg = GenesisConfig {93 collator_selection: CollatorSelectionConfig { invulnerables },94 session: SessionConfig { keys },95 parachain_info: ParachainInfoConfig {96 parachain_id: PARA_ID.into(),97 },98 ..GenesisConfig::default()99 };100101 cfg.build_storage().unwrap().into()102}103104#[cfg(not(feature = "collator-selection"))]105fn make_basic_storage() -> Storage {106 use crate::AuraConfig;107108 let cfg = GenesisConfig {109 aura: AuraConfig {110 authorities: vec![111 get_from_seed::<AuraId>("Alice"),112 get_from_seed::<AuraId>("Bob"),113 ],114 },115 parachain_info: ParachainInfoConfig {116 parachain_id: PARA_ID.into(),117 },118 ..GenesisConfig::default()119 };120121 cfg.build_storage().unwrap().into()122}runtime/common/tests/xcm.rsdiffbeforeafterboth--- a/runtime/common/tests/xcm.rs
+++ b/runtime/common/tests/xcm.rs
@@ -14,149 +14,53 @@
// You should have received a copy of the GNU General Public License
// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
-use xcm_executor::traits::ShouldExecute;
-use xcm::latest::prelude::*;
-use logtest::Logger;
-use crate::RuntimeCall;
-use super::new_test_ext;
-use frame_support::pallet_prelude::Weight;
-
-fn catch_xcm_barrier_log(logger: &mut Logger, expected_msg: &str) -> Result<(), String> {
- for record in logger {
- if record.target() == "xcm::barrier" && record.args() == expected_msg {
- return Ok(());
- }
- }
-
- Err(format!(
- "the expected XCM barrier log `{}` is not found",
- expected_msg
- ))
-}
-
-/// WARNING: Uses log capturing
-/// See https://docs.rs/logtest/latest/logtest/index.html#constraints
-pub fn barrier_denies_transact<B: ShouldExecute>(logger: &mut Logger) {
- let location = MultiLocation {
- parents: 0,
- interior: Junctions::Here,
- };
-
- // We will never decode this "call",
- // so it is irrelevant what we are passing to the `transact` cmd.
- let fake_encoded_call = vec![0u8];
-
- let transact_inst: Instruction<RuntimeCall> = Transact {
- origin_kind: OriginKind::Superuser,
- require_weight_at_most: Weight::default(),
- call: fake_encoded_call.into(),
- };
-
- let mut xcm_program = vec![transact_inst];
+use xcm::{
+ VersionedXcm,
+ latest::{prelude::*, Error}
+};
+use codec::Encode;
+use crate::{Runtime, RuntimeCall, RuntimeOrigin, RuntimeEvent, PolkadotXcm};
+use super::{new_test_ext, last_events, AccountId};
+use frame_support::{
+ pallet_prelude::Weight,
+};
- let max_weight = Weight::from_parts(100_000, 100_000);
- let mut weight_credit = Weight::from_parts(100_000_000, 100_000_000);
+const ALICE: AccountId = AccountId::new([0u8; 32]);
+const BOB: AccountId = AccountId::new([1u8; 32]);
- let result = B::should_execute(&location, &mut xcm_program, max_weight, &mut weight_credit);
+const INITIAL_BALANCE: u128 = 1000000000000000000_0000; // 1000 UNQ
- assert!(
- result.is_err(),
- "the barrier should disallow the XCM transact cmd"
- );
+#[test]
+pub fn xcm_transact_is_forbidden() {
+ new_test_ext(vec![(ALICE, INITIAL_BALANCE)]).execute_with(|| {
+ PolkadotXcm::execute(
+ RuntimeOrigin::signed(ALICE),
+ Box::new(VersionedXcm::from(Xcm(vec![
+ Transact {
+ origin_kind: OriginKind::Native,
+ require_weight_at_most: Weight::from_parts(1000, 1000),
+ call: RuntimeCall::Balances(
+ pallet_balances::Call::<Runtime>::transfer {
+ dest: BOB.into(),
+ value: INITIAL_BALANCE / 2,
+ }
+ ).encode().into(),
+ }
+ ]))),
+ Weight::from_parts(1001000, 2000),
+ ).expect("XCM execute must succeed, the error should be in the `PolkadotXcm::Attempted` event");
- catch_xcm_barrier_log(logger, "transact XCM rejected").unwrap();
-}
-
-fn xcm_execute<B: ShouldExecute>(
- self_para_id: u32,
- location: &MultiLocation,
- xcm: &mut [Instruction<RuntimeCall>],
-) -> Result<(), ()> {
- new_test_ext(self_para_id).execute_with(|| {
- let max_weight = Weight::from_parts(100_000, 100_000);
- let mut weight_credit = Weight::from_parts(100_000_000, 100_000_000);
-
- B::should_execute(&location, xcm, max_weight, &mut weight_credit)
- })
-}
-
-fn make_multiassets(location: &MultiLocation) -> MultiAssets {
- let id = AssetId::Concrete(location.clone());
- let fun = Fungibility::Fungible(42);
- let multiasset = MultiAsset { id, fun };
-
- multiasset.into()
-}
-
-fn make_transfer_reserve_asset(location: &MultiLocation) -> Xcm<RuntimeCall> {
- let assets = make_multiassets(location);
- let inst = TransferReserveAsset {
- assets,
- dest: location.clone(),
- xcm: Xcm(vec![]),
- };
-
- Xcm::<RuntimeCall>(vec![inst])
-}
-
-fn make_deposit_reserve_asset(location: &MultiLocation) -> Xcm<RuntimeCall> {
- let assets = make_multiassets(location);
- let inst = DepositReserveAsset {
- assets: assets.into(),
- dest: location.clone(),
- xcm: Xcm(vec![]),
- };
-
- Xcm::<RuntimeCall>(vec![inst])
-}
-
-fn expect_transfer_location_denied<B: ShouldExecute>(
- logger: &mut Logger,
- self_para_id: u32,
- location: &MultiLocation,
- xcm: &mut [Instruction<RuntimeCall>],
-) -> Result<(), String> {
- let result = xcm_execute::<B>(self_para_id, location, xcm);
-
- if result.is_ok() {
- return Err("the barrier should deny the unknown location".into());
- }
-
- catch_xcm_barrier_log(logger, "Unexpected deposit or transfer location")
-}
-
-/// WARNING: Uses log capturing
-/// See https://docs.rs/logtest/latest/logtest/index.html#constraints
-pub fn barrier_denies_transfer_from_unknown_location<B>(
- logger: &mut Logger,
- self_para_id: u32,
-) -> Result<(), String>
-where
- B: ShouldExecute,
-{
- const UNKNOWN_PARACHAIN_ID: u32 = 4057;
-
- let unknown_location = MultiLocation {
- parents: 1,
- interior: X1(Parachain(UNKNOWN_PARACHAIN_ID)),
- };
-
- let mut transfer_reserve_asset = make_transfer_reserve_asset(&unknown_location);
- let mut deposit_reserve_asset = make_deposit_reserve_asset(&unknown_location);
-
- expect_transfer_location_denied::<B>(
- logger,
- self_para_id,
- &unknown_location,
- &mut transfer_reserve_asset.0,
- )?;
-
- expect_transfer_location_denied::<B>(
- logger,
- self_para_id,
- &unknown_location,
- &mut deposit_reserve_asset.0,
- )?;
-
- Ok(())
+ let xcm_event = &last_events(1)[0];
+ match xcm_event {
+ RuntimeEvent::PolkadotXcm(
+ pallet_xcm::Event::<Runtime>::Attempted(
+ Outcome::Incomplete(_weight, Error::NoPermission)
+ )
+ ) => { /* Pass */ },
+ _ => panic!(
+ "Expected PolkadotXcm.Attempted(Incomplete(_weight, NoPermission)),\
+ found: {xcm_event:#?}"
+ )
+ }
+ });
}
runtime/opal/Cargo.tomldiffbeforeafterboth--- a/runtime/opal/Cargo.toml
+++ b/runtime/opal/Cargo.toml
@@ -307,8 +307,5 @@
impl-trait-for-tuples = { workspace = true }
-[dev-dependencies]
-logtest = { workspace = true }
-
[build-dependencies]
substrate-wasm-builder = { workspace = true }
runtime/opal/src/lib.rsdiffbeforeafterboth--- a/runtime/opal/src/lib.rs
+++ b/runtime/opal/src/lib.rs
@@ -41,9 +41,6 @@
pub mod xcm_barrier;
-#[cfg(test)]
-mod tests;
-
pub use runtime_common::*;
pub const RUNTIME_NAME: &str = "opal";
runtime/opal/src/tests/logcapture.rsdiffbeforeafterboth--- a/runtime/opal/src/tests/logcapture.rs
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
-// This file is part of Unique Network.
-
-// Unique Network is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// Unique Network is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License
-// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
-
-use logtest::Logger;
-use super::xcm::opal_xcm_tests;
-
-#[test]
-fn opal_log_capture_tests() {
- let mut logger = Logger::start();
-
- opal_xcm_tests(&mut logger);
-}
runtime/opal/src/tests/mod.rsdiffbeforeafterboth--- a/runtime/opal/src/tests/mod.rs
+++ /dev/null
@@ -1,18 +0,0 @@
-// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
-// This file is part of Unique Network.
-
-// Unique Network is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// Unique Network is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License
-// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
-
-mod logcapture;
-mod xcm;
runtime/opal/src/tests/xcm.rsdiffbeforeafterboth--- a/runtime/opal/src/tests/xcm.rs
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
-// This file is part of Unique Network.
-
-// Unique Network is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// Unique Network is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License
-// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
-
-use logtest::Logger;
-use crate::{runtime_common::tests::xcm::*, xcm_barrier::Barrier};
-
-const OPAL_PARA_ID: u32 = 2095; // Same as Quartz
-
-pub fn opal_xcm_tests(logger: &mut Logger) {
- barrier_denies_transact::<Barrier>(logger);
-
- barrier_denies_transfer_from_unknown_location::<Barrier>(logger, OPAL_PARA_ID)
- .expect_err("opal runtime allows any location");
-}
runtime/quartz/Cargo.tomldiffbeforeafterboth--- a/runtime/quartz/Cargo.toml
+++ b/runtime/quartz/Cargo.toml
@@ -300,8 +300,5 @@
impl-trait-for-tuples = { workspace = true }
-[dev-dependencies]
-logtest = { workspace = true }
-
[build-dependencies]
substrate-wasm-builder = { workspace = true }
runtime/quartz/src/lib.rsdiffbeforeafterboth--- a/runtime/quartz/src/lib.rs
+++ b/runtime/quartz/src/lib.rs
@@ -41,9 +41,6 @@
pub mod xcm_barrier;
-#[cfg(test)]
-mod tests;
-
pub use runtime_common::*;
#[cfg(feature = "become-sapphire")]
runtime/quartz/src/tests/logcapture.rsdiffbeforeafterboth--- a/runtime/quartz/src/tests/logcapture.rs
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
-// This file is part of Unique Network.
-
-// Unique Network is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// Unique Network is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License
-// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
-
-use logtest::Logger;
-use super::xcm::quartz_xcm_tests;
-
-#[test]
-fn quartz_log_capture_tests() {
- let mut logger = Logger::start();
-
- quartz_xcm_tests(&mut logger);
-}
runtime/quartz/src/tests/mod.rsdiffbeforeafterboth--- a/runtime/quartz/src/tests/mod.rs
+++ /dev/null
@@ -1,18 +0,0 @@
-// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
-// This file is part of Unique Network.
-
-// Unique Network is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// Unique Network is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License
-// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
-
-mod logcapture;
-mod xcm;
runtime/quartz/src/tests/xcm.rsdiffbeforeafterboth--- a/runtime/quartz/src/tests/xcm.rs
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
-// This file is part of Unique Network.
-
-// Unique Network is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// Unique Network is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License
-// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
-
-use logtest::Logger;
-use crate::{runtime_common::tests::xcm::*, xcm_barrier::Barrier};
-
-const QUARTZ_PARA_ID: u32 = 2095;
-
-pub fn quartz_xcm_tests(logger: &mut Logger) {
- barrier_denies_transact::<Barrier>(logger);
-
- barrier_denies_transfer_from_unknown_location::<Barrier>(logger, QUARTZ_PARA_ID)
- .expect("quartz runtime denies an unknown location");
-}
runtime/unique/Cargo.tomldiffbeforeafterboth--- a/runtime/unique/Cargo.toml
+++ b/runtime/unique/Cargo.toml
@@ -298,8 +298,5 @@
impl-trait-for-tuples = { workspace = true }
-[dev-dependencies]
-logtest = { workspace = true }
-
[build-dependencies]
substrate-wasm-builder = { workspace = true }
runtime/unique/src/lib.rsdiffbeforeafterboth--- a/runtime/unique/src/lib.rs
+++ b/runtime/unique/src/lib.rs
@@ -41,9 +41,6 @@
pub mod xcm_barrier;
-#[cfg(test)]
-mod tests;
-
pub use runtime_common::*;
pub const RUNTIME_NAME: &str = "unique";
runtime/unique/src/tests/logcapture.rsdiffbeforeafterboth--- a/runtime/unique/src/tests/logcapture.rs
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
-// This file is part of Unique Network.
-
-// Unique Network is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// Unique Network is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License
-// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
-
-use logtest::Logger;
-use super::xcm::unique_xcm_tests;
-
-#[test]
-fn unique_log_capture_tests() {
- let mut logger = Logger::start();
-
- unique_xcm_tests(&mut logger);
-}
runtime/unique/src/tests/mod.rsdiffbeforeafterboth--- a/runtime/unique/src/tests/mod.rs
+++ /dev/null
@@ -1,18 +0,0 @@
-// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
-// This file is part of Unique Network.
-
-// Unique Network is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// Unique Network is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License
-// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
-
-mod logcapture;
-mod xcm;
runtime/unique/src/tests/xcm.rsdiffbeforeafterboth--- a/runtime/unique/src/tests/xcm.rs
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
-// This file is part of Unique Network.
-
-// Unique Network is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// Unique Network is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License
-// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
-
-use logtest::Logger;
-use crate::{runtime_common::tests::xcm::*, xcm_barrier::Barrier};
-
-const UNIQUE_PARA_ID: u32 = 2037;
-
-pub fn unique_xcm_tests(logger: &mut Logger) {
- barrier_denies_transact::<Barrier>(logger);
-
- barrier_denies_transfer_from_unknown_location::<Barrier>(logger, UNIQUE_PARA_ID)
- .expect("unique runtime denies an unknown location");
-}