Skip to content

Commit

Permalink
fixes post-deploy CI tests to work with basic auth
Browse files Browse the repository at this point in the history
  • Loading branch information
awdem committed Oct 9, 2024
1 parent 4c87a89 commit 29dc037
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
1 change: 1 addition & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand Down
12 changes: 11 additions & 1 deletion .circleci/tests/test_against_fqdn.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 29dc037

Please sign in to comment.