meal-order-manager/tests/test_terraform_iam.py
Adam Moussa 697deb94fd
Some checks are pending
Deploy API / Resolve target (push) Waiting to run
Deploy API / Deploy API to (push) Blocked by required conditions
fix(iam): omit checkcomponents from the ECS boundary in non-prod (#202)
2026-09-21 16:26:17 -04:00

12 lines
459 B
Python

"""ECS task boundary stays a valid IAM document when Paychex is unset."""
from pathlib import Path
IAM = Path(__file__).resolve().parents[1] / "terraform" / "iam.tf"
def test_checkcomponents_send_omitted_when_queue_arn_empty():
text = IAM.read_text()
assert "compact([var.checkcomponents_queue_arn])" not in text
assert 'for_each = var.checkcomponents_queue_arn == "" ? [] : [1]' in text
assert 'sid = "CheckcomponentsSend"' in text