diff --git a/cypress/e2e.sh b/cypress/e2e.sh index a847e0dd33..f80b11c923 100755 --- a/cypress/e2e.sh +++ b/cypress/e2e.sh @@ -79,13 +79,13 @@ echo http_response=0 polls=0 -while [[ $http_response != "200" && $polls -lt 72 ]]; do +while [[ $http_response != *"UP"* && $polls -lt 72 ]]; do ((polls++)) sleep 5 echo "Waiting for backend to start at ${TEST_ENV}${BACKEND_URL_PATH}" http_response=$(curl -skL -w "%{http_code}" "${TEST_ENV}${BACKEND_URL_PATH}") done -if [[ $http_response -ne 200 ]]; then +if [[ $http_response != *"UP"* ]]; then echo 'Backend never started. Exiting...' exit 1 fi diff --git a/lighthouse.sh b/lighthouse.sh index c09a224401..bc2c65cfc6 100755 --- a/lighthouse.sh +++ b/lighthouse.sh @@ -6,13 +6,13 @@ docker compose -f docker-compose.yml -f docker-compose.ci.yml up -d --quiet-pull echo "Waiting for backend to start at https://localhost.simplereport.gov/api/actuator/health" http_response=0 polls=0 -while [[ $http_response != "200" && $polls -lt 180 ]]; do +while [[ $http_response != *"UP"* && $polls -lt 180 ]]; do ((polls++)) sleep 2 echo "Waiting for backend to start at https://localhost.simplereport.gov/api/actuator/health" http_response=$(curl -skL -w "%{http_code}" "https://localhost.simplereport.gov/api/actuator/health") done -if [[ $http_response -ne 200 ]]; then +if [[ $http_response != *"UP"* ]]; then echo 'Backend never started. Exiting...' exit 1 fi