Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 7 commits into from
Feb 15, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@serban300 we reference this script in polkadot-sdk/cumulus/parachains/runtimes/bridge-hubs/README.md e.g. ./cumulus/scripts/bridges_rococo_westend.sh run-relay, could you please also fix/check that README.md that it is still working?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks ! Missed that. Fixed.


# import common functions
source "$(dirname "$0")"/bridges_common.sh
source "${BASH_SOURCE%/*}/../../utils/bridges.sh"

# Expected sovereign accounts.
#
Expand Down
2 changes: 1 addition & 1 deletion bridges/zombienet/environments/rococo-westend/helper.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/bash

$POLKADOT_SDK_PATH/cumulus/scripts/bridges_rococo_westend.sh "$@"
$POLKADOT_SDK_PATH/bridges/zombienet/environments/rococo-westend/bridges_rococo_westend.sh "$@"
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Description: User is able to transfer WND from Westend Asset Hub to Rococo Asset Hub and back
Network: ../../../../cumulus/zombienet/bridge-hubs/bridge_hub_rococo_local_network.toml
Network: ./bridge_hub_rococo_local_network.toml
Creds: config

# ensure that initialization has completed
Expand Down
2 changes: 1 addition & 1 deletion bridges/zombienet/environments/rococo-westend/rococo.zndsl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Description: User is able to transfer WND from Westend Asset Hub to Rococo Asset Hub and back
Network: ../../../../cumulus/zombienet/bridge-hubs/bridge_hub_rococo_local_network.toml
Network: ./bridge_hub_rococo_local_network.toml
Creds: config

# relay is already started - let's wait until with-Westend GRANPDA pallet is initialized at Rococo
Expand Down
4 changes: 2 additions & 2 deletions bridges/zombienet/environments/rococo-westend/spawn.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ done
logs_dir=$TEST_DIR/logs
helper_script="${BASH_SOURCE%/*}/helper.sh"

rococo_def=$POLKADOT_SDK_PATH/cumulus/zombienet/bridge-hubs/bridge_hub_rococo_local_network.toml
rococo_def=${BASH_SOURCE%/*}/bridge_hub_rococo_local_network.toml
start_zombienet $TEST_DIR $rococo_def rococo_dir rococo_pid
echo

westend_def=$POLKADOT_SDK_PATH/cumulus/zombienet/bridge-hubs/bridge_hub_westend_local_network.toml
westend_def=${BASH_SOURCE%/*}/bridge_hub_westend_local_network.toml
start_zombienet $TEST_DIR $westend_def westend_dir westend_pid
echo

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Description: User is able to transfer ROC from Rococo Asset Hub to Westend Asset Hub and back
Network: ../../../../cumulus/zombienet/bridge-hubs/bridge_hub_westend_local_network.toml
Network: ./bridge_hub_westend_local_network.toml
Creds: config

# ensure that initialization has completed
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Description: User is able to transfer ROC from Rococo Asset Hub to Westend Asset Hub and back
Network: ../../../../cumulus/zombienet/bridge-hubs/bridge_hub_westend_local_network.toml
Network: ./bridge_hub_westend_local_network.toml
Creds: config

# relay is already started - let's wait until with-Rococo GRANPDA pallet is initialized at Westend
Expand Down
2 changes: 1 addition & 1 deletion bridges/zombienet/scripts/invoke-script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

INVOKE_LOG=`mktemp -p $TEST_FOLDER invoke.XXXXX`

pushd $POLKADOT_SDK_PATH/cumulus/scripts
pushd $POLKADOT_SDK_PATH/bridges/zombienet/environments/rococo-westend
./bridges_rococo_westend.sh $1 >$INVOKE_LOG 2>&1
popd
2 changes: 1 addition & 1 deletion bridges/zombienet/scripts/start-relayer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

RELAY_LOG=`mktemp -p $TEST_FOLDER relay.XXXXX`

pushd $POLKADOT_SDK_PATH/cumulus/scripts
pushd $POLKADOT_SDK_PATH/bridges/zombienet/environments/rococo-westend
./bridges_rococo_westend.sh run-relay >$RELAY_LOG 2>&1&
popd

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Description: User is able to transfer ROC from Rococo Asset Hub to Westend Asset Hub and back
Network: ../../../../cumulus/zombienet/bridge-hubs/bridge_hub_westend_local_network.toml
Network: ../../environments/rococo-westend/bridge_hub_westend_local_network.toml
Creds: config

# send ROC to //Alice from Rococo AH to Westend AH
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Description: User is able to transfer WND from Westend Asset Hub to Rococo Asset Hub and back
Network: ../../../../cumulus/zombienet/bridge-hubs/bridge_hub_rococo_local_network.toml
Network: ../../environments/rococo-westend/bridge_hub_rococo_local_network.toml
Creds: config

# send WND to //Alice from Westend AH to Rococo AH
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Description: User is able to transfer ROC from Rococo Asset Hub to Westend Asset Hub and back
Network: ../../../../cumulus/zombienet/bridge-hubs/bridge_hub_westend_local_network.toml
Network: ../../environments/rococo-westend/bridge_hub_westend_local_network.toml
Creds: config

# send wROC back to Alice from Westend AH to Rococo AH
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Description: User is able to transfer ROC from Rococo Asset Hub to Westend Asset Hub and back
Network: ../../../../cumulus/zombienet/bridge-hubs/bridge_hub_westend_local_network.toml
Network: ../../environments/rococo-westend/bridge_hub_westend_local_network.toml
Creds: config

# send wWND back to Alice from Rococo AH to Westend AH
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Description: While relayer is idle, we only sync mandatory Rococo (and a single Rococo BH) headers to Westend BH.
Network: ../../../../cumulus/zombienet/bridge-hubs/bridge_hub_westend_local_network.toml
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
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Description: While relayer is idle, we only sync mandatory Westend (and a single Westend BH) headers to Rococo BH.
Network: ../../../../cumulus/zombienet/bridge-hubs/bridge_hub_rococo_local_network.toml
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
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Description: While relayer is active, we only sync mandatory and required Rococo (and Rococo BH) headers to Westend BH.
Network: ../../../cumulus/zombienet/bridge-hubs/bridge_hub_westend_local_network.toml
Network: ../environments/rococo-westend/bridge_hub_westend_local_network.toml
Creds: config

# step 1: initialize Westend AH
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Description: While relayer is active, we only sync mandatory and required Westend (and Westend BH) headers to Rococo BH.
Network: ../../../cumulus/zombienet/bridge-hubs/bridge_hub_rococo_local_network.toml
Network: ../environments/rococo-westend/bridge_hub_rococo_local_network.toml
Creds: config

# step 1: initialize Rococo AH
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ function generate_hex_encoded_call_data() {
shift
echo "Input params: $@"

node $(dirname "$0")/generate_hex_encoded_call "$type" "$endpoint" "$output" "$@"
node ${BASH_SOURCE%/*}/../utils/generate_hex_encoded_call "$type" "$endpoint" "$output" "$@"
local retVal=$?

if [ $type != "check" ]; then
Expand Down
Loading