Skip to content

Commit

Permalink
fix backend start for e2e (#6841)
Browse files Browse the repository at this point in the history
* fix e2e

* fix lighthouse.sh backend start

* remove -ne flag form comparison
  • Loading branch information
BobanL authored Oct 25, 2023
1 parent d4e7cb1 commit 7dfabfb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions cypress/e2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions lighthouse.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7dfabfb

Please sign in to comment.