DEVX-177: fix: fail-open molecule selection and honest fast-path contract
Post-merge / detect-and-configure (push) Successful in 9s
Post-merge / release-and-maintain (push) Successful in 1m3s

This commit was merged in pull request #350.
This commit is contained in:
2026-09-23 08:10:19 +00:00
parent 6d3622465e
commit ca55cfd29a
6 changed files with 290 additions and 139 deletions
+4 -3
View File
@@ -40,9 +40,10 @@ class TestBuildMoleculeCommands:
commands = build_molecule_commands({"role_a", "role_b"}, str(roles_dir))
assert len(commands) == 2
assert all("molecule test -s default" in c for c in commands)
assert all("--destroy=never" in c for c in commands)
assert all("ubuntu-2604" in c for c in commands)
# REQ-3: emitted commands are exactly what run_molecule_scenario
# executes — full `molecule test -s <scenario>`, no synthetic flags.
assert commands == ["molecule test -s default", "molecule test -s default"]
assert all("--destroy" not in c and "--platform-name" not in c for c in commands)
def test_empty_when_no_scenarios(self, tmp_path: Path) -> None:
commands = build_molecule_commands({"nonexistent"}, str(tmp_path / "ansible" / "roles"))