Replicate e2e integration test as emulated (#2958)

* Allow functions to work over both parachains and relay chains

* additional references

* import

* backup

* refactoring para and relay traits

* use runtime crates to build types

* decouple ProcessMessage

* decouple ProcessMessage 2

* dmp and xcmp handlers decouple

* backup

* refactor done

* common int values working

* added global ext with mutex

* works for two mutex

* single mutex and remove condvar

* global test ext done

* failing moving test_ext because relay block num

* relay_block_number issue fixed

* backup

* Test working with assertions

* assertions get Test as arg

* DispatchArgs as generic

* clean up

* backup

* teleports for asset-hub-kusama done

* improve assert_expected_events macro

* rename Test generics

* check assertions for tuples

* test assertions redone

* reserve_transfer_assets done

* send transact done

* hrmp test for paras

* hrmp channels test done

* hrmp channels test done 2

* before modifying test dispatch

* reserve tests done & Test dispatch fixed

* reserve transfer local asset

* force_create_and_mint_asset

* force create and mint done

* tests done

* fix imports in common

* common events refactored

* add option to events attributes

* asset-hub-polkadot tests done

* asset-hub-westend half done

* relay chain events move to common

* remove failing send tests for asset-hub-westend

* added events to bridge-hub-rococo

* added events to collectives-polkadot

* cargo clean up

* fix asset-hub-westend tests

* ".git/.scripts/commands/fmt/fmt.sh"

* fix clippy

* ".git/.scripts/commands/fmt/fmt.sh"

* Removed unnecessary deps

* Extracted some commonality for Kusama/Polkadot (which will be reused also for BridgeHubs) (#2971)

* Extracted some commonality for Kusama/Polkadot (which will be reused also for BridgeHubs)

* AssetHubRococo should better use AssetHubKusama runtime

* add fund_account

---------

Co-authored-by: NachoPal <ignacio.palacios.santos@gmail.com>

* address comments

* rename event assertion helpers

* clean comments

* address comments 2

* ".git/.scripts/commands/fmt/fmt.sh"

---------

Co-authored-by: Giles Cope <gilescope@gmail.com>
Co-authored-by: command-bot <>
Co-authored-by: Branislav Kontur <bkontur@gmail.com>
This commit is contained in:
Ignacio Palacios
2023-08-10 19:38:18 +02:00
committed by GitHub
parent e077bdd99f
commit eadfbca388
40 changed files with 5344 additions and 1300 deletions
@@ -7,6 +7,8 @@ description = "Common resources for integration testing with xcm-emulator"
[dependencies]
codec = { package = "parity-scale-codec", version = "3.4.0", default-features = false }
lazy_static = "1.4.0"
paste = "1.0.14"
# Substrate
grandpa = { package = "sc-consensus-grandpa", git = "https://github.com/paritytech/substrate", branch = "master" }
@@ -20,6 +22,7 @@ sp-consensus-babe = { default-features = false, git = "https://github.com/parity
pallet-balances = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "master" }
pallet-assets = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "master" }
pallet-staking = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "master" }
pallet-message-queue = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "master" }
pallet-im-online = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "master" }
beefy-primitives = { package = "sp-consensus-beefy", git = "https://github.com/paritytech/substrate", branch = "master" }
@@ -54,6 +57,9 @@ bridge-hub-kusama-runtime = { path = "../../../runtimes/bridge-hubs/bridge-hub-k
bridge-hub-polkadot-runtime = { path = "../../../runtimes/bridge-hubs/bridge-hub-polkadot" }
bridge-hub-rococo-runtime = { path = "../../../runtimes/bridge-hubs/bridge-hub-rococo" }
xcm-emulator = { default-features = false, path = "../../../../xcm/xcm-emulator" }
cumulus-pallet-dmp-queue = { path = "../../../../pallets/dmp-queue" }
cumulus-pallet-xcmp-queue = { default-features = false, path = "../../../../pallets/xcmp-queue" }
cumulus-pallet-parachain-system = { path = "../../../../pallets/parachain-system" }
bp-messages = { path = "../../../../bridges/primitives/messages"}
bp-runtime = { path = "../../../../bridges/primitives/runtime"}
pallet-bridge-messages = { path = "../../../../bridges/modules/messages" }