Validate training completion handoff
GeoIntel release gates / Compile, test, contracts and builds (push) Canceled after 0s
GeoIntel release gates / Python and npm vulnerability policy (push) Canceled after 0s
GeoIntel release gates / GIS image, SBOM and container scan (push) Canceled after 0s

This commit is contained in:
Jens
2026-07-29 15:48:51 +02:00
parent d6502140da
commit f18a23c060
3 changed files with 30 additions and 4 deletions
+14 -2
View File
@@ -33,5 +33,17 @@ def test_container_running_fails_closed_on_inspect_error(monkeypatch) -> None:
def test_completion_command_requires_non_empty_string_list(tmp_path: Path) -> None:
invalid = tmp_path / "command.json"
invalid.write_text('{"shell": "unsafe"}', encoding="utf-8")
value = MODULE.json.loads(invalid.read_text(encoding="utf-8"))
assert not isinstance(value, list)
try:
MODULE.load_completion_command(invalid)
except ValueError as exc:
assert "non-empty JSON list" in str(exc)
else:
raise AssertionError("mapping-shaped completion command was accepted")
def test_completion_command_preserves_exact_argv_without_shell_parsing(tmp_path: Path) -> None:
command = tmp_path / "command.json"
command.write_text('["docker", "exec", "-d", "geointel", "python", "loop.py"]', encoding="utf-8")
assert MODULE.load_completion_command(command) == [
"docker", "exec", "-d", "geointel", "python", "loop.py"
]