From 61551eb40dc68b6cd0ecf9ed582d95ba70d6cc61 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Wed, 27 Dec 2023 04:24:37 +0100 Subject: [PATCH] Fix tests in CI context / yunohost-api is down and it's expected --- src/tests/test_sso_and_portalapi.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/tests/test_sso_and_portalapi.py b/src/tests/test_sso_and_portalapi.py index af0f436c2..6bbea730e 100644 --- a/src/tests/test_sso_and_portalapi.py +++ b/src/tests/test_sso_and_portalapi.py @@ -161,7 +161,8 @@ def test_public_routes_not_blocked_by_ssowat(): r = request(f"https://{maindomain}/yunohost/api/whatever") # Getting code 405, Method not allowed, which means the API does answer, # meaning it's not blocked by ssowat - assert r.status_code == 405 + # Or : on the CI, the yunohost-api is likely to be down (to save resources) + assert r.status_code in [405, 502] Path("/var/www/.well-known/acme-challenge-public/toto").touch() r = request(f"http://{maindomain}/.well-known/acme-challenge/toto")