From f2c905504668083c49e413b3f2338bbd805bc9f3 Mon Sep 17 00:00:00 2001 From: awdem Date: Tue, 10 Dec 2024 12:38:14 +0000 Subject: [PATCH] adapts smoke tests to use basic auth in dev and stage --- .circleci/tests/test_against_fqdn.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.circleci/tests/test_against_fqdn.py b/.circleci/tests/test_against_fqdn.py index e567bd0..92a4b42 100644 --- a/.circleci/tests/test_against_fqdn.py +++ b/.circleci/tests/test_against_fqdn.py @@ -9,7 +9,17 @@ def make_request(url): - req = httpx.get(url, timeout=20) + dc_env = os.environ.get("DC_ENVIRONMENT") + + if dc_env == "development" or dc_env == "staging": + req = httpx.get( + url, + timeout=20, + auth=("dc", "dc"), + ) + else: + req = httpx.get(url, timeout=20) + req.raise_for_status() return req