Fix test
Some checks failed
CI / test (push) Failing after 1m34s
Lint / test (push) Successful in 29s
Trivy / test (push) Successful in 19s

This commit is contained in:
Miguel Jacq 2025-12-15 12:22:59 +11:00
parent 2eecb73a49
commit 283f3286f2
Signed by: mig5
GPG key ID: 59B3F0C24135C6A9

View file

@ -96,7 +96,7 @@ def test_manifest_writes_roles_and_playbook_with_clean_when(tmp_path: Path):
# Service role: conditional start must be a clean Ansible expression
tasks = (out / "roles" / "foo" / "tasks" / "main.yml").read_text(encoding="utf-8")
assert "when: foo_start | bool" in tasks
assert "when:\n - foo_start | bool\n - _unit_exists.rc == 0\n" in tasks
# Ensure we didn't emit deprecated/broken '{{ }}' delimiters in when:
for line in tasks.splitlines():
if line.lstrip().startswith("when:"):