Fix tests in CI context / yunohost-api is down and it's expected

This commit is contained in:
Alexandre Aubin 2023-12-27 04:24:37 +01:00
parent 0856f27b46
commit 61551eb40d

View file

@ -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")