Change how the ui tests waits for the ui to be ready

This commit is contained in:
Théophile Diot 2023-09-26 07:44:08 +01:00
parent ea5cb0db2d
commit 95afba8792
No known key found for this signature in database
GPG key ID: 248FEA4BAE400D06
2 changed files with 3 additions and 3 deletions

View file

@ -29,13 +29,13 @@ while not ready:
with suppress(RequestException):
status_code = get("http://www.example.com/admin").status_code
if status_code > 500:
if status_code > 500 and status_code != 502:
print("An error occurred with the server, exiting ...", flush=True)
exit(1)
ready = status_code < 400
if retries > 10:
if retries > 20:
print("UI took too long to be ready, exiting ...", flush=True)
exit(1)
elif not ready:

View file

@ -116,7 +116,7 @@ else
sleep 5
echo "🌐 Linux stack is healthy ✅"
echo "🌐 Web UI is healthy ✅"
fi
# Start tests