mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 04:11:07 +00:00
Run bridges zombienet tests on CI (#2439)
Brridges zombienet tests are non-standard - zombienet currently missing multiple relay chains support (see e.g. https://github.com/paritytech/zombienet/pull/796), so we need to go live with two relay networks, their parachains + custom test runner (which e.g. doesn't shutdown net when its tests are finished and instead waits for both networks tests to complete). So we are stuck with native zombienet provider => this PR is an attempt to gather everything in a single docker container and run tests there ~Draft, because it is far from finishing - what I want now is to see how it works on CI~
This commit is contained in:
committed by
GitHub
parent
6579d6cce6
commit
5ed0a75fcd
@@ -1,27 +1,21 @@
|
||||
#!/bin/bash
|
||||
|
||||
function ensure_binaries() {
|
||||
if [[ ! -f ~/local_bridge_testing/bin/polkadot ]]; then
|
||||
echo " Required polkadot binary '~/local_bridge_testing/bin/polkadot' does not exist!"
|
||||
echo " You need to build it and copy to this location!"
|
||||
echo " Please, check ./parachains/runtimes/bridge-hubs/README.md (Prepare/Build/Deploy)"
|
||||
exit 1
|
||||
fi
|
||||
if [[ ! -f ~/local_bridge_testing/bin/polkadot-parachain ]]; then
|
||||
echo " Required polkadot-parachain binary '~/local_bridge_testing/bin/polkadot-parachain' does not exist!"
|
||||
echo " You need to build it and copy to this location!"
|
||||
echo " Please, check ./parachains/runtimes/bridge-hubs/README.md (Prepare/Build/Deploy)"
|
||||
exit 1
|
||||
fi
|
||||
function relayer_path() {
|
||||
local default_path=~/local_bridge_testing/bin/substrate-relay
|
||||
local path="${SUBSTRATE_RELAY_PATH:-$default_path}"
|
||||
echo "$path"
|
||||
}
|
||||
|
||||
function ensure_relayer() {
|
||||
if [[ ! -f ~/local_bridge_testing/bin/substrate-relay ]]; then
|
||||
echo " Required substrate-relay binary '~/local_bridge_testing/bin/substrate-relay' does not exist!"
|
||||
local path=$(relayer_path)
|
||||
if [[ ! -f "$path" ]]; then
|
||||
echo " Required substrate-relay binary '$path' does not exist!"
|
||||
echo " You need to build it and copy to this location!"
|
||||
echo " Please, check ./parachains/runtimes/bridge-hubs/README.md (Prepare/Build/Deploy)"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo $path
|
||||
}
|
||||
|
||||
function ensure_polkadot_js_api() {
|
||||
|
||||
@@ -132,10 +132,10 @@ LANE_ID="00000002"
|
||||
XCM_VERSION=3
|
||||
|
||||
function init_ro_wnd() {
|
||||
ensure_relayer
|
||||
local relayer_path=$(ensure_relayer)
|
||||
|
||||
RUST_LOG=runtime=trace,rpc=trace,bridge=trace \
|
||||
~/local_bridge_testing/bin/substrate-relay init-bridge rococo-to-bridge-hub-westend \
|
||||
$relayer_path init-bridge rococo-to-bridge-hub-westend \
|
||||
--source-host localhost \
|
||||
--source-port 9942 \
|
||||
--source-version-mode Auto \
|
||||
@@ -146,10 +146,10 @@ function init_ro_wnd() {
|
||||
}
|
||||
|
||||
function init_wnd_ro() {
|
||||
ensure_relayer
|
||||
local relayer_path=$(ensure_relayer)
|
||||
|
||||
RUST_LOG=runtime=trace,rpc=trace,bridge=trace \
|
||||
~/local_bridge_testing/bin/substrate-relay init-bridge westend-to-bridge-hub-rococo \
|
||||
$relayer_path init-bridge westend-to-bridge-hub-rococo \
|
||||
--source-host localhost \
|
||||
--source-port 9945 \
|
||||
--source-version-mode Auto \
|
||||
@@ -160,10 +160,10 @@ function init_wnd_ro() {
|
||||
}
|
||||
|
||||
function run_relay() {
|
||||
ensure_relayer
|
||||
local relayer_path=$(ensure_relayer)
|
||||
|
||||
RUST_LOG=runtime=trace,rpc=trace,bridge=trace \
|
||||
~/local_bridge_testing/bin/substrate-relay relay-headers-and-messages bridge-hub-rococo-bridge-hub-westend \
|
||||
$relayer_path relay-headers-and-messages bridge-hub-rococo-bridge-hub-westend \
|
||||
--rococo-host localhost \
|
||||
--rococo-port 9942 \
|
||||
--rococo-version-mode Auto \
|
||||
|
||||
Reference in New Issue
Block a user