Bridge zombienet tests - move all test scripts to the same folder (#3333)

Related to https://github.com/paritytech/polkadot-sdk/issues/3242
This commit is contained in:
Serban Iorga
2024-02-15 13:56:58 +01:00
committed by GitHub
parent 150a360c41
commit 5fc7622cb3
58 changed files with 97 additions and 229 deletions
@@ -0,0 +1,8 @@
Description: While relayer is idle, we only sync mandatory Rococo (and a single Rococo BH) headers to Westend BH.
Network: ../../environments/rococo-westend/bridge_hub_westend_local_network.toml
Creds: config
# ensure that relayer is only syncing mandatory headers while idle. This includes both headers that were
# generated while relay was offline and those in the next 100 seconds while script is active.
bridge-hub-westend-collator1: js-script ../../js-helpers/only-mandatory-headers-synced-when-idle.js with "300,rococo-at-westend" within 600 seconds
@@ -0,0 +1,35 @@
#!/bin/bash
set -e
source "${BASH_SOURCE%/*}/../../utils/common.sh"
source "${BASH_SOURCE%/*}/../../utils/zombienet.sh"
# We use `--relayer-delay` in order to sleep some time before starting relayer.
# We want to sleep for at least 1 session, which is expected to be 60 seconds for test environment.
${BASH_SOURCE%/*}/../../environments/rococo-westend/spawn.sh &
env_pid=$!
ensure_process_file $env_pid $TEST_DIR/rococo.env 400
rococo_dir=`cat $TEST_DIR/rococo.env`
echo
ensure_process_file $env_pid $TEST_DIR/westend.env 180
westend_dir=`cat $TEST_DIR/westend.env`
echo
# Sleep for some time before starting the relayer. We want to sleep for at least 1 session,
# which is expected to be 60 seconds for the test environment.
echo -e "Sleeping 90s before starting relayer ...\n"
sleep 90
${BASH_SOURCE%/*}/../../environments/rococo-westend/start_relayer.sh $rococo_dir $westend_dir relayer_pid
# Sometimes the relayer syncs multiple parachain heads in the begining leading to test failures.
# See issue: https://github.com/paritytech/parity-bridges-common/issues/2838.
# TODO: Remove this sleep after the issue is fixed.
echo -e "Sleeping 180s before runing the tests ...\n"
sleep 180
run_zndsl ${BASH_SOURCE%/*}/rococo-to-westend.zndsl $westend_dir
run_zndsl ${BASH_SOURCE%/*}/westend-to-rococo.zndsl $rococo_dir
@@ -0,0 +1,7 @@
Description: While relayer is idle, we only sync mandatory Westend (and a single Westend BH) headers to Rococo BH.
Network: ../../environments/rococo-westend/bridge_hub_rococo_local_network.toml
Creds: config
# ensure that relayer is only syncing mandatory headers while idle. This includes both headers that were
# generated while relay was offline and those in the next 100 seconds while script is active.
bridge-hub-rococo-collator1: js-script ../../js-helpers/only-mandatory-headers-synced-when-idle.js with "300,westend-at-rococo" within 600 seconds