feat(catalog): cover Windows guest-mutating tools in the starter list (#5)

This commit was merged in pull request #5.
This commit is contained in:
2026-09-21 15:06:41 -04:00
parent 90768f17e1
commit 5039f7378d
3 changed files with 44 additions and 1 deletions
+19
View File
@@ -31,3 +31,22 @@ def test_entry_requires_fields():
raise AssertionError("expected ValueError")
except ValueError:
pass
def test_example_config_covers_windows_and_linux():
"""The starter catalog must not be Linux-only.
The catalog is opt-in: an unlisted tool passes through unguarded. A
Windows-only shop taking the shipped defaults would therefore mutate
protected guests with no checkpoint at all.
"""
example = Path(__file__).resolve().parent.parent / "config.example.json"
data = json.loads(example.read_text(encoding="utf-8"))
cat = MutatingCatalog.from_config(data)
assert cat.get("ssh", "exec") is not None
assert cat.get("winrm", "run_command") is not None
assert cat.get("winrm", "run_ps") is not None
assert cat.get("powershell", "invoke_command") is not None
# every entry must name the arg holding the VM, or the guard cannot resolve one
for entry in cat.list():
assert entry.vm_arg, f"{entry.server}/{entry.tool} has no vm_arg"