Add validation indexes and generated views
This commit is contained in:
parent
dc44208c9f
commit
c112bf5c74
37 changed files with 2007 additions and 8 deletions
|
|
@ -1,6 +1,8 @@
|
|||
import json
|
||||
import shutil
|
||||
|
||||
from info_tech_canon.cli import main
|
||||
from info_tech_canon.service import DEFAULT_INFOSPACE_ROOT
|
||||
|
||||
|
||||
def test_cli_inspect_emits_json(capsys) -> None:
|
||||
|
|
@ -19,3 +21,15 @@ def test_cli_missing_profile_uses_structured_error(capsys) -> None:
|
|||
payload = json.loads(capsys.readouterr().out)
|
||||
assert payload["ok"] is False
|
||||
assert payload["error"]["code"] == "missing_profile"
|
||||
|
||||
|
||||
def test_cli_index_generates_views(capsys, tmp_path) -> None:
|
||||
root = tmp_path / "infospace"
|
||||
shutil.copytree(DEFAULT_INFOSPACE_ROOT, root)
|
||||
|
||||
exit_code = main(["--root", str(root), "index"])
|
||||
|
||||
assert exit_code == 0
|
||||
payload = json.loads(capsys.readouterr().out)
|
||||
assert payload["ok"] is True
|
||||
assert (root / "views" / "kernel-overview.md").is_file()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue