fix(test-deployment container): fix frontend readiness tests with new vite bundling changes (#1078)

This commit is contained in:
Gergő Jedlicska
2022-10-05 17:11:13 +02:00
committed by GitHub
parent 2fef8b7de3
commit 2aefbd27e1
+3 -2
View File
@@ -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")