Skip to content

Commit

Permalink
improve hygiene & clean up - tests
Browse files Browse the repository at this point in the history
  • Loading branch information
NachoPal committed Aug 29, 2023
1 parent b13e4e8 commit f29ba0f
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 82 deletions.
1 change: 1 addition & 0 deletions 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 @@ -18,39 +18,29 @@ pub use codec::Encode;
pub use frame_support::{
assert_err, assert_ok,
pallet_prelude::Weight,
sp_runtime::{AccountId32, DispatchError, DispatchResult, MultiAddress},
traits::{fungibles::Inspect, OriginTrait},
sp_runtime::{AccountId32, DispatchError, DispatchResult},
traits::fungibles::Inspect,
};
pub use integration_tests_common::{
constants::{
accounts::{ALICE, BOB},
asset_hub_kusama::ED as ASSET_HUB_KUSAMA_ED,
kusama::ED as KUSAMA_ED,
PROOF_SIZE_THRESHOLD, REF_TIME_THRESHOLD, XCM_V3,
},
xcm_helpers::{xcm_transact_paid_execution, xcm_transact_unpaid_execution}, AssetHubKusama,
AssetHubKusamaPallet, AssetHubKusamaReceiver, AssetHubKusamaSender, BridgeHubKusama,
BridgeHubKusamaPallet, BridgeHubKusamaReceiver, BridgeHubKusamaSender, BridgeHubPolkadot,
BridgeHubPolkadotPallet, BridgeHubPolkadotReceiver, BridgeHubPolkadotSender, Collectives,
CollectivesPallet, CollectivesReceiver, CollectivesSender, Kusama, KusamaMockNet, KusamaPallet,
KusamaReceiver, KusamaSender, PenpalKusamaA, PenpalKusamaAPallet, PenpalKusamaAReceiver,
PenpalKusamaASender, PenpalKusamaB, PenpalKusamaBPallet, PenpalKusamaBReceiver,
PenpalKusamaBSender, PenpalPolkadotA, PenpalPolkadotAReceiver, PenpalPolkadotASender, Polkadot,
PolkadotMockNet, PolkadotPallet, PolkadotReceiver, PolkadotSender,
Kusama, PenpalKusamaA, AssetHubKusamaReceiver, KusamaPallet, AssetHubKusamaPallet,
AssetHubKusamaSender, PenpalKusamaAReceiver, KusamaReceiver, KusamaSender,
PenpalKusamaAPallet, PenpalKusamaASender
};
pub use parachains_common::{AccountId, Balance};
pub use polkadot_core_primitives::InboundDownwardMessage;
pub use polkadot_parachain::primitives::{HrmpChannelId, Id};
pub use polkadot_runtime_parachains::inclusion::{AggregateMessageOrigin, UmpQueueId};
pub use xcm::{
prelude::{*, AccountId32 as AccountId32Junction},
v3::{Error, NetworkId::Kusama as KusamaId},
DoubleEncoded,
};
pub use xcm_emulator::{
assert_expected_events, bx, helpers::weight_within_threshold,
Chain, ParaId, Parachain as Para, RelayChain as Relay, Test, TestArgs,
TestContext, TestExt, TestExternalities,
Chain, Parachain as Para, RelayChain as Relay, Test, TestArgs,
TestContext, TestExt
};

pub const ASSET_ID: u32 = 1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,37 +18,29 @@ pub use codec::Encode;
pub use frame_support::{
assert_err, assert_ok,
pallet_prelude::Weight,
sp_runtime::{AccountId32, DispatchError, DispatchResult, MultiAddress},
traits::{fungibles::Inspect, OriginTrait},
sp_runtime::{AccountId32, DispatchError, DispatchResult},
traits::fungibles::Inspect,
};
pub use integration_tests_common::{
constants::{
accounts::{ALICE, BOB},
asset_hub_polkadot::ED as ASSET_HUB_POLKADOT_ED,
polkadot::ED as POLKADOT_ED,
PROOF_SIZE_THRESHOLD, REF_TIME_THRESHOLD, XCM_V3,
},
xcm_helpers::{xcm_transact_paid_execution, xcm_transact_unpaid_execution},
AssetHubPolkadot, AssetHubPolkadotPallet, AssetHubPolkadotReceiver, AssetHubPolkadotSender, BridgeHubPolkadot,
BridgeHubPolkadotPallet, BridgeHubPolkadotReceiver, BridgeHubPolkadotSender, Collectives,
CollectivesPallet, CollectivesReceiver, CollectivesSender, PenpalPolkadotA,
PenpalPolkadotAPallet, PenpalPolkadotAReceiver, PenpalPolkadotASender, PenpalPolkadotB,
PenpalPolkadotBPallet, PenpalPolkadotBReceiver, PenpalPolkadotBSender, Polkadot,
PolkadotMockNet, PolkadotPallet, PolkadotReceiver, PolkadotSender,
AssetHubPolkadot, Polkadot, PolkadotPallet, PenpalPolkadotA, AssetHubPolkadotPallet,
AssetHubPolkadotReceiver, PolkadotSender, PolkadotReceiver, AssetHubPolkadotSender,
PenpalPolkadotAReceiver
};
pub use parachains_common::{AccountId, Balance};
pub use polkadot_core_primitives::InboundDownwardMessage;
pub use polkadot_parachain::primitives::{HrmpChannelId, Id};
pub use polkadot_runtime_parachains::inclusion::{AggregateMessageOrigin, UmpQueueId};
pub use xcm::{
prelude::{*, AccountId32 as AccountId32Junction},
v3::{Error, NetworkId::Polkadot as PolkadotId},
DoubleEncoded,
};
pub use xcm_emulator::{
assert_expected_events, bx, helpers::weight_within_threshold,
Chain, ParaId, Parachain as Para, RelayChain as Relay, Test, TestArgs,
TestContext, TestExt, TestExternalities,
Chain, Parachain as Para, RelayChain as Relay, Test, TestArgs,
TestContext, TestExt
};

pub const ASSET_ID: u32 = 1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,36 +19,31 @@ pub use frame_support::{
assert_err, assert_ok,
instances::Instance2,
pallet_prelude::Weight,
sp_runtime::{AccountId32, DispatchError, DispatchResult, ModuleError, MultiAddress},
traits::{fungibles::Inspect, OriginTrait},
sp_runtime::{AccountId32, DispatchError, DispatchResult, ModuleError},
traits::fungibles::Inspect,
BoundedVec,
};
pub use integration_tests_common::{
constants::{
accounts::{ALICE, BOB},
asset_hub_westend::ED as ASSET_HUB_WESTEND_ED,
westend::ED as WESTEND_ED,
PROOF_SIZE_THRESHOLD, REF_TIME_THRESHOLD, XCM_V3,
},
xcm_helpers::{xcm_transact_paid_execution, xcm_transact_unpaid_execution},
AssetHubWestend, AssetHubWestendPallet, AssetHubWestendReceiver, AssetHubWestendSender, Collectives,
CollectivesPallet, CollectivesReceiver, CollectivesSender, PenpalWestendA,
PenpalWestendAPallet, PenpalWestendAReceiver, PenpalWestendASender, Westend, WestendMockNet,
WestendPallet, WestendReceiver, WestendSender,
AssetHubWestend, Westend, PenpalWestendA, AssetHubWestendReceiver,
AssetHubWestendPallet, WestendPallet, WestendSender, WestendReceiver,
AssetHubWestendSender, PenpalWestendAReceiver, PenpalWestendASender,
PenpalWestendAPallet,
};
pub use parachains_common::{AccountId, Balance};
pub use polkadot_core_primitives::InboundDownwardMessage;
pub use polkadot_parachain::primitives::{HrmpChannelId, Id};
pub use polkadot_runtime_parachains::inclusion::{AggregateMessageOrigin, UmpQueueId};
pub use xcm::{
prelude::{*, AccountId32 as AccountId32Junction},
v3::{Error, NetworkId::Westend as WestendId},
DoubleEncoded,
};
pub use xcm_emulator::{
assert_expected_events, bx, helpers::weight_within_threshold,
Chain, ParaId, Parachain as Para, RelayChain as Relay, Test, TestArgs,
TestContext, TestExt, TestExternalities,
Chain, Parachain as Para, RelayChain as Relay, Test, TestArgs,
TestContext, TestExt
};

pub const ASSET_ID: u32 = 1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ pallet-xcm = { path = "../../../../../../polkadot/xcm/pallet-xcm", default-featu
# Cumulus
parachains-common = { path = "../../../../common" }
cumulus-pallet-xcmp-queue = { path = "../../../../../pallets/xcmp-queue", default-features = false}
cumulus-pallet-dmp-queue = { path = "../../../../../pallets/dmp-queue", default-features = false}
cumulus-pallet-parachain-system = { path = "../../../../../pallets/parachain-system" }
pallet-bridge-messages = { path = "../../../../../bridges/modules/messages", default-features = false}
bp-messages = { path = "../../../../../bridges/primitives/messages", default-features = false}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,46 +15,29 @@
// along with Cumulus. If not, see <http://www.gnu.org/licenses/>.

pub use bp_messages::LaneId;
pub use codec::Encode;
pub use frame_support::{
assert_err, assert_ok,
pallet_prelude::Weight,
sp_runtime::{AccountId32, DispatchError, DispatchResult, MultiAddress},
traits::{fungibles::Inspect, OriginTrait},
};
pub use frame_support::assert_ok;
pub use integration_tests_common::{
constants::{
accounts::{ALICE, BOB},
asset_hub_kusama::ED as ASSET_HUB_ROCOCO_ED,
kusama::ED as ROCOCO_ED,
PROOF_SIZE_THRESHOLD, REF_TIME_THRESHOLD, XCM_V3,
},
xcm_helpers::{xcm_transact_paid_execution, xcm_transact_unpaid_execution},
AssetHubRococo, AssetHubRococoPallet, AssetHubRococoReceiver, AssetHubRococoSender, AssetHubWococo,
AssetHubWococoPallet, AssetHubWococoReceiver, AssetHubWococoSender, BridgeHubRococo,
BridgeHubRococoPallet, BridgeHubRococoReceiver, BridgeHubRococoSender, BridgeHubWococo,
BridgeHubWococoPallet, BridgeHubWococoReceiver, BridgeHubWococoSender, Collectives,
CollectivesPallet, CollectivesReceiver, CollectivesSender, PenpalRococoA, PenpalRococoAPallet,
PenpalRococoAReceiver, PenpalRococoASender, Rococo, RococoMockNet, RococoPallet,
RococoReceiver, RococoSender, Wococo, WococoMockNet, WococoPallet, WococoReceiver,
WococoSender,
Rococo, BridgeHubRococo, AssetHubWococo, RococoPallet, BridgeHubWococo,
AssetHubRococo, PenpalRococoA, AssetHubRococoReceiver,
};
pub use parachains_common::{AccountId, Balance};
pub use polkadot_core_primitives::InboundDownwardMessage;
pub use polkadot_parachain::primitives::{HrmpChannelId, Id};
pub use polkadot_runtime_parachains::inclusion::{AggregateMessageOrigin, UmpQueueId};
pub use xcm::{
prelude::{*, AccountId32 as AccountId32Junction},
v3::{
Error,
NetworkId::{Rococo as RococoId, Wococo as WococoId},
},
DoubleEncoded,
};
pub use xcm_emulator::{
assert_expected_events, bx, helpers::weight_within_threshold,
Chain, ParaId, Parachain as Para, RelayChain as Relay, Test, TestArgs,
TestContext, TestExt, TestExternalities,
Chain, Parachain as Para, RelayChain as Relay, Test, TestArgs,
TestContext, TestExt
};

pub const ASSET_ID: u32 = 1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,34 +16,23 @@

pub use codec::Encode;
pub use frame_support::{
assert_err, assert_ok,
pallet_prelude::Weight,
sp_runtime::{AccountId32, DispatchError, DispatchResult, MultiAddress},
traits::{fungibles::Inspect, OriginTrait},
assert_ok, sp_runtime::AccountId32,
};
pub use integration_tests_common::{
constants::{
accounts::{ALICE, BOB},
accounts::ALICE,
asset_hub_polkadot::ED as ASSET_HUB_POLKADOT_ED,
polkadot::ED as POLKADOT_ED,
PROOF_SIZE_THRESHOLD, REF_TIME_THRESHOLD, XCM_V3,
},
xcm_helpers::{xcm_transact_paid_execution, xcm_transact_unpaid_execution},
AssetHubPolkadot, AssetHubPolkadotPallet, AssetHubPolkadotReceiver, AssetHubPolkadotSender, BridgeHubPolkadot,
BridgeHubPolkadotPallet, BridgeHubPolkadotReceiver, BridgeHubPolkadotSender, Collectives,
CollectivesPallet, CollectivesReceiver, CollectivesSender, PenpalPolkadotA,
PenpalPolkadotAPallet, PenpalPolkadotAReceiver, PenpalPolkadotASender, PenpalPolkadotB,
PenpalPolkadotBPallet, PenpalPolkadotBReceiver, PenpalPolkadotBSender, Polkadot,
PolkadotMockNet, PolkadotPallet, PolkadotReceiver, PolkadotSender,
AssetHubPolkadot, Polkadot, AssetHubPolkadotReceiver, PenpalPolkadotA,
AssetHubPolkadotPallet, Collectives,
};
pub use parachains_common::{AccountId, Balance};
pub use polkadot_core_primitives::InboundDownwardMessage;
pub use polkadot_parachain::primitives::{HrmpChannelId, Id};
pub use polkadot_runtime_parachains::inclusion::{AggregateMessageOrigin, UmpQueueId};
pub use xcm::{
prelude::{*, AccountId32 as AccountId32Junction},
v3::{Error, NetworkId::Polkadot as PolkadotId},
DoubleEncoded,
};
pub use xcm_emulator::{
assert_expected_events, bx, helpers::weight_within_threshold,
Expand Down

0 comments on commit f29ba0f

Please sign in to comment.