diff --git a/test-runner.sh b/test-runner.sh index e0e674f..1a01518 100755 --- a/test-runner.sh +++ b/test-runner.sh @@ -81,10 +81,14 @@ if [[ "$DEPLOY_INFRA" == "true" ]]; then 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}" # 🔍 Set BATS test files echo "🚀 Running tests with tags: $FILTER_TAGS" diff --git a/tests/.env b/tests/.env index f368eaa..beac13b 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="" +L2_RPC_URL="http://127.0.0.1:53015" L2_SENDER_PRIVATE_KEY=0x12d7de8621a77640c9241b2595ba78ce443d05e94090365ab3bb5e19df82c625 \ No newline at end of file