Skip to content

Commit

Permalink
add claim assets tests for people
Browse files Browse the repository at this point in the history
  • Loading branch information
Zihan Zhao authored and Zihan Zhao committed Jul 10, 2024
1 parent 35804f8 commit 4c5633b
Show file tree
Hide file tree
Showing 6 changed files with 68 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,10 @@ mod imports {
pub use rococo_system_emulated_network::{
people_rococo_emulated_chain::{
genesis::ED as PEOPLE_ROCOCO_ED,
people_rococo_runtime::{people, xcm_config::XcmConfig as PeopleRococoXcmConfig},
people_rococo_runtime::{
people, xcm_config::XcmConfig as PeopleRococoXcmConfig,
ExistentialDeposit as PeopleRococoExistentialDeposit,
},
PeopleRococoParaPallet as PeopleRococoPallet,
},
rococo_emulated_chain::{
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
// 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.

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

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

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

test_chain_can_claim_assets!(PeopleRococo, RuntimeCall, NetworkId::Rococo, assets, amount);
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.

mod claim_assets;
mod reap_identity;
mod teleport;
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,10 @@ mod imports {
self,
people_westend_emulated_chain::{
genesis::ED as PEOPLE_WESTEND_ED,
people_westend_runtime::{people, xcm_config::XcmConfig as PeopleWestendXcmConfig},
people_westend_runtime::{
people, xcm_config::XcmConfig as PeopleWestendXcmConfig,
ExistentialDeposit as PeopleWestendExistentialDeposit,
},
PeopleWestendParaPallet as PeopleWestendPallet,
},
westend_emulated_chain::{
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
// 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.

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

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

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

test_chain_can_claim_assets!(PeopleWestend, RuntimeCall, NetworkId::Westend, assets, amount);
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.

mod claim_assets;
mod reap_identity;
mod teleport;

0 comments on commit 4c5633b

Please sign in to comment.