Files
lodestar/scripts/run_e2e_env.sh
Nazar Hussain 0e93c07a51 ci: add support for the CI env for e2e tests (#5488)
* Add support for the CI env for e2e tests

* Update the port number e2e tests node

* Update the script

* Update the e2e script

* Stop the e2e tests env

* Update the script to stop env

* Add a timeout for port

* Redirect nohup output

* Redirect nohup output

* Update the process signal

* Move the run bash script to a file

* Remove the unwanted wait time

* Update the variaable name

* Update the script name

* Update the test env

* Update the e2e env to start from capella

* Increase the genesis delay

* Pass three epoch to fix the sync comittee availability

* Increase the wait epoch

* Wait for the 3rd epoch

* Increase timeout

* Add lodestar preset value

* Fix env variable

* Set the forks in incremental sequence

* Increase the timeout

* Move wait logic to test file

* Fix the geth version

* Allow to pass custom config to support custom network

* Fix lint error

* Add minimal preset for the e2e tests
2023-05-30 11:14:06 -04:00

26 lines
638 B
Bash
Executable File

#!/bin/bash
function start_app() {
mkdir -p test-logs/e2e-test-env
export LODESTAR_PRESET=minimal
nohup npx 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 60000 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)
}
case "$1" in
start) start_app ;;
stop) stop_app ;;
*) echo "usage: $0 start|stop" >&2
exit 1
;;
esac