From 812ccb09237707534b01b9745c90b6e42992fbc8 Mon Sep 17 00:00:00 2001 From: marcello33 Date: Tue, 5 Mar 2024 10:33:56 +0100 Subject: [PATCH] fix: root folder for docker integration tests (#1173) (#1175) --- integration-tests/bor_health.sh | 4 ++-- integration-tests/smoke_test.sh | 16 ++++++++-------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/integration-tests/bor_health.sh b/integration-tests/bor_health.sh index 63aba9aab1..0791d415fd 100644 --- a/integration-tests/bor_health.sh +++ b/integration-tests/bor_health.sh @@ -3,8 +3,8 @@ set -e while true do - peers=$(docker exec bor0 bash -c "bor attach /root/var/lib/bor/data/bor.ipc -exec 'admin.peers'") - block=$(docker exec bor0 bash -c "bor attach /root/var/lib/bor/data/bor.ipc -exec 'eth.blockNumber'") + peers=$(docker exec bor0 bash -c "bor attach /var/lib/bor/data/bor.ipc -exec 'admin.peers'") + block=$(docker exec bor0 bash -c "bor attach /var/lib/bor/data/bor.ipc -exec 'eth.blockNumber'") if [[ -n "$peers" ]] && [[ -n "$block" ]]; then break diff --git a/integration-tests/smoke_test.sh b/integration-tests/smoke_test.sh index 9275093b16..4541ec5d4d 100644 --- a/integration-tests/smoke_test.sh +++ b/integration-tests/smoke_test.sh @@ -1,7 +1,7 @@ #!/bin/bash set -e -balanceInit=$(docker exec bor0 bash -c "bor attach /root/var/lib/bor/data/bor.ipc -exec 'Math.round(web3.fromWei(eth.getBalance(eth.accounts[0])))'") +balanceInit=$(docker exec bor0 bash -c "bor attach /var/lib/bor/data/bor.ipc -exec 'Math.round(web3.fromWei(eth.getBalance(eth.accounts[0])))'") stateSyncFound="false" checkpointFound="false" @@ -10,8 +10,8 @@ start_time=$SECONDS while true do - - balance=$(docker exec bor0 bash -c "bor attach /root/var/lib/bor/data/bor.ipc -exec 'Math.round(web3.fromWei(eth.getBalance(eth.accounts[0])))'") + + balance=$(docker exec bor0 bash -c "bor attach /var/lib/bor/data/bor.ipc -exec 'Math.round(web3.fromWei(eth.getBalance(eth.accounts[0])))'") if ! [[ "$balance" =~ ^[0-9]+$ ]]; then echo "Something is wrong! Can't find the balance of first account in bor network." @@ -19,10 +19,10 @@ do fi if (( $balance > $balanceInit )); then - if [ $stateSyncFound != "true" ]; then + if [ $stateSyncFound != "true" ]; then stateSyncTime=$(( SECONDS - start_time )) - stateSyncFound="true" - fi + stateSyncFound="true" + fi fi checkpointID=$(curl -sL http://localhost:1317/checkpoints/latest | jq .result.id) @@ -31,12 +31,12 @@ do if [ $checkpointFound != "true" ]; then checkpointTime=$(( SECONDS - start_time )) checkpointFound="true" - fi + fi fi if [ $stateSyncFound == "true" ] && [ $checkpointFound == "true" ]; then break - fi + fi done echo "Both state sync and checkpoint went through. All tests have passed!"