diff --git a/packages/cli/test/scripts/e2e_test_env.ts b/packages/cli/test/scripts/e2e_test_env.ts index b35b3524d8cf..b5fa48260194 100644 --- a/packages/cli/test/scripts/e2e_test_env.ts +++ b/packages/cli/test/scripts/e2e_test_env.ts @@ -14,6 +14,7 @@ const {forkConfig} = defineSimTestConfig({ BELLATRIX_FORK_EPOCH: bellatrixForkEpoch, CAPELLA_FORK_EPOCH: capellaForkEpoch, runTillEpoch: Infinity, + initialNodes: 2, }); const env = await SimulationEnvironment.initWithDefaults( diff --git a/scripts/run_e2e_env.sh b/scripts/run_e2e_env.sh index 2e472181da17..9d12ae449c2a 100755 --- a/scripts/run_e2e_env.sh +++ b/scripts/run_e2e_env.sh @@ -1,19 +1,19 @@ #!/bin/bash +DIR=$(dirname "$0") + function start_app() { mkdir -p test-logs/e2e-test-env - source ../.env.test export LODESTAR_PRESET=minimal - nohup node --loader ts-node/esm packages/cli/test/scripts/e2e_test_env.ts > test-logs/e2e-test-env/simulation.out 2>&1 & + export DOTENV_CONFIG_PATH="$DIR/../.env.test" + nohup node -r dotenv/config --loader ts-node/esm packages/cli/test/scripts/e2e_test_env.ts > test-logs/e2e-test-env/simulation.out 2>&1 & echo $! > test-logs/e2e-test-env/simulation.pid echo "Wait for the node to be ready" npx wait-port -t 120000 0.0.0.0:5001 } function stop_app() { - kill -9 $(cat test-logs/e2e-test-env/simulation.pid) - # Incase the process pid file is not present - kill -9 $(lsof -t -i:5001) + kill -s TERM $(cat test-logs/e2e-test-env/simulation.pid) }