Skip to content

Commit 9c925cb

Browse files
authored
Merge pull request #740 from NHSDigital/fix-notifications-smoke-test-conditional
Fix `RUN_NOTIFICATIONS_SMOKE_TEST` variable check
2 parents 21dda90 + e017ade commit 9c925cb

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

infrastructure/modules/container-apps/jobs.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ module "scheduled_jobs" {
110110
source = "../dtos-devops-templates/infrastructure/modules/container-app-job"
111111
for_each = {
112112
for k, v in local.scheduled_jobs : k => v
113-
if var.run_notifications_smoke_test
113+
if(var.run_notifications_smoke_test || k != "smoke_test")
114114
}
115115

116116
name = "${var.app_short_name}-${each.value.job_short_name}-${var.environment}"

scripts/terraform/terraform.mk

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,9 @@ terraform-validate: terraform-init-no-backend # Validate Terraform changes - mak
7676
terraform -chdir=infrastructure/terraform validate
7777

7878
notifications-smoke-test:
79-
$(if ${TF_VAR_run_notifications_smoke_test}, \
80-
pip install pytest mesh-client \
81-
pytest -vv scripts/python/smoke_test/notifications_smoke_test.py, \
82-
echo "Notifications smoke test skipped." \
83-
)
79+
if test "${RUN_NOTIFICATIONS_SMOKE_TEST}" == "true"; then
80+
pip install pytest mesh-client
81+
pytest -vv scripts/python/smoke_test/notifications_smoke_test.py
82+
else
83+
echo "Skipping notifications smoke test"
84+
fi

0 commit comments

Comments
 (0)