2026-09-21 16:26:17 -04:00
|
|
|
"""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"
|
|
|
|
|
|
|
|
|
|
|
2026-09-25 22:10:24 +00:00
|
|
|
def test_task_boundary_can_publish_the_order_form():
|
|
|
|
|
text = IAM.read_text()
|
|
|
|
|
assert 'sid = "FormObjects"' in text
|
|
|
|
|
assert "cloudfront:CreateInvalidation" in text
|
|
|
|
|
assert "${aws_s3_bucket.form.arn}/index.html" in text
|
|
|
|
|
assert not (IAM.parent / "iam_github_weekly_menu.tf").exists()
|
|
|
|
|
|
|
|
|
|
|
2026-09-21 16:26:17 -04:00
|
|
|
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
|