test_q2_ok_cli_integration.py python
26 lines 1.0 KB
Raw
sha256:c07f2f34a0db9f43fe866f157d1935322008545ff8940c06c7c921eb219c55ab NXP-b DONE: independent BV-r2 pass + ISR (SD-17) Human minor ⚠ breaking 2 days ago
1 """Integration tests for Track Q / Q2b OK CLI entrypoint (§Q2A.10)."""
2
3 from __future__ import annotations
4
5 import json
6 from pathlib import Path
7
8 from tests.support import OVERSEER_DEPRECATION_LINE, run_cli, run_shim, seed_git_repo, write_config
9
10
11 def test_ok_and_overseer_shims_emit_equivalent_status_json(tmp_path: Path) -> None:
12 seed_git_repo(tmp_path)
13 write_config(tmp_path, "config-git-only.yaml")
14 run_cli(["init", "--regime", "git-only", "--non-interactive", "--force"], cwd=tmp_path)
15
16 ok_result = run_shim("ok", ["status", "--json"], cwd=tmp_path)
17 overseer_result = run_shim("overseer", ["status", "--json"], cwd=tmp_path)
18
19 assert ok_result.exit_code == overseer_result.exit_code == 0
20 assert ok_result.stderr == ""
21 assert overseer_result.stderr == OVERSEER_DEPRECATION_LINE
22
23 ok_payload = json.loads(ok_result.stdout)
24 overseer_payload = json.loads(overseer_result.stdout)
25 assert set(ok_payload.keys()) == set(overseer_payload.keys())
26 assert ok_payload.get("initialized") == overseer_payload.get("initialized")
File History 1 commit
sha256:c07f2f34a0db9f43fe866f157d1935322008545ff8940c06c7c921eb219c55ab NXP-b DONE: independent BV-r2 pass + ISR (SD-17) Human minor 2 days ago