From 0f5a63fa6506ee81c55daf20f33fb3f1bef7bab8 Mon Sep 17 00:00:00 2001 From: ImJeremyHe Date: Wed, 21 Aug 2024 10:29:28 +0800 Subject: [PATCH] Separate the l3 test bash --- .github/workflows/smoke-test.yml | 5 +++++ smoke-test-l3.bash | 19 +++++++++++++++++++ smoke-test.bash | 18 ------------------ 3 files changed, 24 insertions(+), 18 deletions(-) create mode 100644 smoke-test-l3.bash diff --git a/.github/workflows/smoke-test.yml b/.github/workflows/smoke-test.yml index 9f4b74f6..bf25120f 100644 --- a/.github/workflows/smoke-test.yml +++ b/.github/workflows/smoke-test.yml @@ -65,3 +65,8 @@ jobs: run: | ./smoke-test.bash timeout-minutes: 30 + + - name: Start Smoke Test For L3 with Latest Espresso Image + run: | + ./smoke-test-l3.bash + timeout-minutes: 30 diff --git a/smoke-test-l3.bash b/smoke-test-l3.bash new file mode 100644 index 00000000..1a11c77e --- /dev/null +++ b/smoke-test-l3.bash @@ -0,0 +1,19 @@ +#!/usr/bin/env bash +set -euo pipefail + +./test-node.bash --init-force --espresso --latest-espresso-image --l3node --l3-token-bridge --l3-fee-token --detach + +# Sending L3 transaction +user=user_l3 +./test-node.bash script send-l3 --ethamount 5 --to $user --wait +userAddress=$(docker compose run scripts print-address --account $user | tail -n 1 | tr -d '\r\n') + +balance=$(cast balance $userAddress --rpc-url http://localhost:3347) + +if [ "$balance" -gt 0 ]; then + echo "Smoke test succeeded" + docker compose down || true +else + echo "transfer failed in l3 node" + exit 1 +fi diff --git a/smoke-test.bash b/smoke-test.bash index cafd8df9..89b36720 100755 --- a/smoke-test.bash +++ b/smoke-test.bash @@ -19,21 +19,3 @@ while true; do done docker compose down - -# Testing the l3node -./test-node.bash --init-force --espresso --latest-espresso-image --l3node --l3-token-bridge --l3-fee-token --detach - -# Sending L3 transaction -user=user_l3 -./test-node.bash script send-l3 --ethamount 5 --to $user --wait -userAddress=$(docker compose run scripts print-address --account $user | tail -n 1 | tr -d '\r\n') - -balance=$(cast balance $userAddress --rpc-url http://localhost:3347) - -if [ "$balance" -gt 0 ]; then - echo "Smoke test succeeded" - docker compose down || true -else - echo "transfer failed in l3 node" - exit 1 -fi