Skip to content

Commit e8ab3ff

Browse files
committed
Export ENVIRONMENT prior to running smoke test
The review environment exports ENVIRONMENT and the smoke test defaults to dev when looking up this environment variable. So the smoke test passes for these environments but fails on preprod as the variable is not set. Ensure we export it prior to running the test.
1 parent b1665ce commit e8ab3ff

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

scripts/python/smoke_test/notifications_smoke_test.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ def configure():
4444
storage_account = f"stmanbrs{environment}uks"
4545

4646
if pr_number != "":
47-
environment = f"pr-{pr_number}"
4847
storage_account = f"stmanbrspr{pr_number}uks"
4948

5049
resource_group_name = f"rg-manbrs-{environment}-container-app-uks"

scripts/terraform/terraform.mk

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,8 @@ terraform-validate: terraform-init-no-backend # Validate Terraform changes - mak
7777

7878
notifications-smoke-test:
7979
if test "${RUN_NOTIFICATIONS_SMOKE_TEST}" == "true"; then
80+
export PR_NUMBER=${PR_NUMBER}
81+
export ENVIRONMENT=${ENVIRONMENT}
8082
pip install pytest mesh-client
8183
pytest -vv scripts/python/smoke_test/notifications_smoke_test.py
8284
else

0 commit comments

Comments
 (0)