Skip to content

Commit

Permalink
Separate the l3 test bash
Browse files Browse the repository at this point in the history
  • Loading branch information
ImJeremyHe committed Aug 21, 2024
1 parent f3705f3 commit 0f5a63f
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 18 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/smoke-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
19 changes: 19 additions & 0 deletions smoke-test-l3.bash
Original file line number Diff line number Diff line change
@@ -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
18 changes: 0 additions & 18 deletions smoke-test.bash
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 0f5a63f

Please sign in to comment.