-
Notifications
You must be signed in to change notification settings - Fork 699
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
116 additions
and
0 deletions.
There are no files selected for viewing
38 changes: 38 additions & 0 deletions
38
cumulus/parachains/integration-tests/emulated/tests/coretime/coretime-rococo/Cargo.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
[package] | ||
name = "coretime-rococo-integration-tests" | ||
version = "0.1.0" | ||
authors.workspace = true | ||
edition.workspace = true | ||
license = "Apache-2.0" | ||
description = "Coretime Rococo runtime integration tests with xcm-emulator" | ||
publish = false | ||
|
||
[dependencies] | ||
codec = { package = "parity-scale-codec", version = "3.4.0", default-features = false } | ||
assert_matches = "1.5.0" | ||
|
||
# Substrate | ||
sp-runtime = { path = "../../../../../../../substrate/primitives/runtime", default-features = false } | ||
frame-support = { path = "../../../../../../../substrate/frame/support", default-features = false } | ||
pallet-balances = { path = "../../../../../../../substrate/frame/balances", default-features = false } | ||
pallet-assets = { path = "../../../../../../../substrate/frame/assets", default-features = false } | ||
pallet-asset-conversion = { path = "../../../../../../../substrate/frame/asset-conversion", default-features = false } | ||
pallet-message-queue = { path = "../../../../../../../substrate/frame/message-queue", default-features = false } | ||
pallet-broker = { path = "../../../../../../../substrate/frame/broker", default-features = false } | ||
|
||
# Polkadot | ||
xcm = { package = "staging-xcm", path = "../../../../../../../polkadot/xcm", default-features = false } | ||
pallet-xcm = { path = "../../../../../../../polkadot/xcm/pallet-xcm", default-features = false } | ||
xcm-executor = { package = "staging-xcm-executor", path = "../../../../../../../polkadot/xcm/xcm-executor", default-features = false } | ||
rococo-runtime = { path = "../../../../../../../polkadot/runtime/rococo" } | ||
rococo-runtime-constants = { path = "../../../../../../../polkadot/runtime/rococo/constants" } | ||
polkadot-primitives = { path = "../../../../../../../polkadot/primitives" } | ||
polkadot-runtime-common = { path = "../../../../../../../polkadot/runtime/common" } | ||
|
||
# Cumulus | ||
asset-test-utils = { path = "../../../../../runtimes/assets/test-utils" } | ||
parachains-common = { path = "../../../../../../parachains/common" } | ||
coretime-rococo-runtime = { path = "../../../../../runtimes/coretime/coretime-rococo" } | ||
emulated-integration-tests-common = { path = "../../../common", default-features = false } | ||
penpal-runtime = { path = "../../../../../runtimes/testing/penpal" } | ||
rococo-system-emulated-network = { path = "../../../networks/rococo-system" } |
64 changes: 64 additions & 0 deletions
64
cumulus/parachains/integration-tests/emulated/tests/coretime/coretime-rococo/src/lib.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
// 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. | ||
|
||
pub use codec::Encode; | ||
|
||
// Substrate | ||
pub use frame_support::{ | ||
assert_err, assert_ok, | ||
pallet_prelude::Weight, | ||
sp_runtime::{AccountId32, DispatchError, DispatchResult}, | ||
traits::fungibles::Inspect, | ||
}; | ||
|
||
// Polkadot | ||
pub use xcm::{ | ||
prelude::{AccountId32 as AccountId32Junction, *}, | ||
v3::{Error, NetworkId::Rococo as RococoId}, | ||
}; | ||
|
||
// Cumulus | ||
pub use asset_test_utils::xcm_helpers; | ||
pub use emulated_integration_tests_common::{ | ||
test_parachain_is_trusted_teleporter, | ||
xcm_emulator::{ | ||
assert_expected_events, bx, helpers::weight_within_threshold, Chain, Parachain as Para, | ||
RelayChain as Relay, Test, TestArgs, TestContext, TestExt, | ||
}, | ||
xcm_helpers::{xcm_transact_paid_execution, xcm_transact_unpaid_execution}, | ||
PROOF_SIZE_THRESHOLD, REF_TIME_THRESHOLD, XCM_V3, | ||
}; | ||
pub use parachains_common::{AccountId, Balance}; | ||
pub use rococo_system_emulated_network::{ | ||
coretime_rococo_emulated_chain::{ | ||
genesis::ED as CORETIME_ROCOCO_ED, CoretimeRococoParaPallet as CoretimeRococoPallet, | ||
}, | ||
rococo_emulated_chain::{genesis::ED as ROCOCO_ED, RococoRelayPallet as RococoPallet}, | ||
CoretimeRococoPara as CoretimeRococo, CoretimeRococoParaReceiver as CoretimeRococoReceiver, | ||
CoretimeRococoParaSender as CoretimeRococoSender, PenpalAPara as PenpalA, | ||
RococoRelay as Rococo, RococoRelayReceiver as RococoReceiver, | ||
RococoRelaySender as RococoSender, | ||
}; | ||
|
||
// pub const ASSET_ID: u32 = 1; | ||
// pub const ASSET_MIN_BALANCE: u128 = 1000; | ||
pub type RelayToSystemParaTest = Test<Rococo, CoretimeRococo>; | ||
pub type RelayToParaTest = Test<Rococo, PenpalA>; | ||
pub type SystemParaToRelayTest = Test<CoretimeRococo, Rococo>; | ||
pub type SystemParaToParaTest = Test<CoretimeRococo, PenpalA>; | ||
pub type ParaToSystemParaTest = Test<PenpalA, CoretimeRococo>; | ||
|
||
#[cfg(test)] | ||
mod tests; |
14 changes: 14 additions & 0 deletions
14
...lus/parachains/integration-tests/emulated/tests/coretime/coretime-rococo/src/tests/mod.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// 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. |