From ea7025c058b25a97efb517baa79d255f6b6b9c0d Mon Sep 17 00:00:00 2001 From: Liam Young Date: Thu, 5 Oct 2023 16:29:25 +0000 Subject: [PATCH] Allow 401s when checking endpoints Some endpoints (heat) return 401s if you try and access them without authenticating. Given the ep has been able to verify whether you are authenticated a 401 is ok for a rudementary health check --- zaza/openstack/charm_tests/keystone/setup.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/zaza/openstack/charm_tests/keystone/setup.py b/zaza/openstack/charm_tests/keystone/setup.py index 22d61435b..2e09682d5 100644 --- a/zaza/openstack/charm_tests/keystone/setup.py +++ b/zaza/openstack/charm_tests/keystone/setup.py @@ -208,4 +208,9 @@ def wait_for_all_endpoints(interface='public'): interface=interface): wait_for_url( ep.url, - [requests.codes.ok, requests.codes.multiple_choices]) + # Heat cloudformation and orchestration return 400 and 401 + [ + requests.codes.ok, + requests.codes.multiple_choices, + requests.codes.bad_request, + requests.codes.unauthorized])