Skip to content

Commit

Permalink
run claim assets test in coretime chain
Browse files Browse the repository at this point in the history
  • Loading branch information
Zihan Zhao authored and programskillforverification committed Jul 15, 2024
1 parent da8df3f commit ae44cd3
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 11 deletions.
1 change: 0 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,4 @@ xcm-executor = { workspace = true }

# Cumulus
emulated-integration-tests-common = { workspace = true }
parachains-common = { workspace = true, default-features = true }
rococo-system-emulated-network = { workspace = true }
Original file line number Diff line number Diff line change
@@ -1,2 +1,40 @@
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0

// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

#[cfg(test)]
mod imports {

// Substrate
pub use frame_support::assert_ok;

// Polkadot
pub use xcm::prelude::*;

// Cumulus
pub use emulated_integration_tests_common::xcm_emulator::{
assert_expected_events, bx, TestExt,
};
pub use rococo_system_emulated_network::{
coretime_rococo_emulated_chain::{
coretime_rococo_runtime::ExistentialDeposit as CoretimeRococoExistentialDeposit,
CoretimeRococoParaPallet as CoretimeRococoPallet,
},
CoretimeRococoPara as CoretimeRococo, CoretimeRococoParaReceiver as CoretimeRococoReceiver,
CoretimeRococoParaSender as CoretimeRococoSender,
};
}

#[cfg(test)]
mod tests;
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@

//! Tests related to claiming assets trapped during XCM execution.
// use crate::imports::*;
use crate::imports::*;

// use emulated_integration_tests_common::test_chain_can_claim_assets;
// use xcm_executor::traits::DropAssets;
use emulated_integration_tests_common::test_chain_can_claim_assets;
use xcm_executor::traits::DropAssets;

// #[test]
// fn assets_can_be_claimed() {
// let amount = CoretimeRococoExistentialDeposit::get();
// let assets: Assets = (Parent, amount).into();
#[test]
fn assets_can_be_claimed() {
let amount = CoretimeRococoExistentialDeposit::get();
let assets: Assets = (Parent, amount).into();

// test_chain_can_claim_assets!(CoretimeRococo, RuntimeCall, NetworkId::Rococo, assets, amount);
// }
test_chain_can_claim_assets!(CoretimeRococo, RuntimeCall, NetworkId::Rococo, assets, amount);
}

0 comments on commit ae44cd3

Please sign in to comment.