From 2aefbd27e135161a6c0d563be6e08225cd45dcb4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gerg=C5=91=20Jedlicska?= <57442769+gjedlicska@users.noreply.github.com> Date: Wed, 5 Oct 2022 17:11:13 +0200 Subject: [PATCH] fix(test-deployment container): fix frontend readiness tests with new vite bundling changes (#1078) --- utils/test-deployment/run_tests.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/utils/test-deployment/run_tests.py b/utils/test-deployment/run_tests.py index 24ca7a745..2d32d182f 100755 --- a/utils/test-deployment/run_tests.py +++ b/utils/test-deployment/run_tests.py @@ -26,8 +26,9 @@ if not SPECKLE_SERVER.startswith('http://') and not SPECKLE_SERVER.startswith('h print(f"Using Speckle server '{SPECKLE_SERVER}'") # Test if frontend is accessible -frontend_response = requests.get(urllib.parse.urljoin(SPECKLE_SERVER, 'img/logo.ddce2456.svg')) -assert frontend_response.status_code == 200, "Frontend request doesn't return status code 200" +frontend_response = requests.get(urllib.parse.urljoin(SPECKLE_SERVER, 'logo.svg')) +# don't check for status code, the frontend app will server the 404 page with a status code 200 +# even if the rote doesn't exist assert frontend_response.headers.get('Content-Type', '').startswith('image/'), 'Frontend logo Content-Type is not an image' print("Frontend accessible")