diff --git a/.circleci/config.yml b/.circleci/config.yml index 71e2eac..21ef897 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -167,6 +167,7 @@ jobs: name: "Post deploy tests" command: | export FQDN=`aws ssm get-parameter --query Parameter.Value --name 'FQDN' --output text` + export DC_ENVIRONMENT=`aws ssm get-parameter --query Parameter.Value --name 'DC_ENVIRONMENT' --output text` pipenv run pytest .circleci/tests/ 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