From b2889be3e802d7bfd8d9a9f31d1e0659ab6cd989 Mon Sep 17 00:00:00 2001 From: dan moore Date: Wed, 5 Feb 2025 13:09:48 +0100 Subject: [PATCH] format cleanups --- .github/workflows/test-e2e.yml | 3 --- core/helpers/common.bash | 4 ---- core/helpers/run-e2e.sh | 9 ++++++--- test-runner.sh | 1 - tests/.env | 2 +- 5 files changed, 7 insertions(+), 12 deletions(-) diff --git a/.github/workflows/test-e2e.yml b/.github/workflows/test-e2e.yml index 623579b..91a0eab 100644 --- a/.github/workflows/test-e2e.yml +++ b/.github/workflows/test-e2e.yml @@ -120,9 +120,6 @@ jobs: - name: Install runner run: make install-runner - - - name: Cast Version (debug) - run: cast --version - name: Run E2E Tests run: | diff --git a/core/helpers/common.bash b/core/helpers/common.bash index a710aac..656adb9 100644 --- a/core/helpers/common.bash +++ b/core/helpers/common.bash @@ -39,8 +39,6 @@ function deploy_contract() { echo "Failed to calculate gas price" >&3 exit 1 fi - echo "Running cast send with command:" - echo "cast send --rpc-url $rpc_url --private-key $private_key --gas-price $comp_gas_price --legacy --create $bytecode" local cast_output=$(cast send --rpc-url "$rpc_url" \ --private-key "$private_key" \ --gas-price $comp_gas_price \ @@ -48,7 +46,6 @@ function deploy_contract() { --create "$bytecode" \ 2>&1) - # Check if cast send was successful if [[ $? -ne 0 ]]; then echo "Error: Failed to send transaction." @@ -332,7 +329,6 @@ function check_balances() { fi } - function verify_balance() { local rpc_url="$1" # RPC URL local token_addr="$2" # gas token contract address diff --git a/core/helpers/run-e2e.sh b/core/helpers/run-e2e.sh index cccebde..1bbc491 100755 --- a/core/helpers/run-e2e.sh +++ b/core/helpers/run-e2e.sh @@ -49,10 +49,13 @@ else echo "Skipping infrastructure deployment. Ensure the required services are already running!" fi -if [[ "$L2_RPC_URL" == "" ]]; then - kurtosis_l2_rpc_url="$(kurtosis port print cdk cdk-erigon-rpc-001 rpc)" +export L2_RPC_URL="${L2_RPC_URL:-$l2_rpc_url}" + +# Check if L2_RPC_URL is empty or not set +if [[ -z "$L2_RPC_URL" ]]; then + echo "Error: L2_RPC_URL is a required environment variable. Please update the .env file." + exit 1 # Exit the script with an error code fi -export L2_RPC_URL="${L2_RPC_URL:-$kurtosis_l2_rpc_url}" # Run selected tests with exported environment variables if [[ "$BATS_TESTS" == "all" ]]; then diff --git a/test-runner.sh b/test-runner.sh index 1a01518..d5103b0 100755 --- a/test-runner.sh +++ b/test-runner.sh @@ -81,7 +81,6 @@ if [[ "$DEPLOY_INFRA" == "true" ]]; then else echo "⏩ Skipping infrastructure deployment. Ensure the required services are already running!" fi - export L2_RPC_URL="${L2_RPC_URL:-$l2_rpc_url}" # Check if L2_RPC_URL is empty or not set diff --git a/tests/.env b/tests/.env index beac13b..f368eaa 100644 --- a/tests/.env +++ b/tests/.env @@ -2,5 +2,5 @@ KURTOSIS_ENCLAVE=cdk TMP_CDK_FOLDER=tmp/cdk USE_L1_GAS_TOKEN_CONTRACT=true -L2_RPC_URL="http://127.0.0.1:53015" +L2_RPC_URL="" L2_SENDER_PRIVATE_KEY=0x12d7de8621a77640c9241b2595ba78ce443d05e94090365ab3bb5e19df82c625 \ No newline at end of file