feat(retirement): route SBOM scans through repo-manager
Assistant: codex Assistant-Model: gpt-5.6-sol Assistant-Session: 01a023c0-a0a3-7c03-b395-5a0d2757214d
This commit is contained in:
parent
b9d9ffed5f
commit
81861d816b
3 changed files with 70 additions and 22 deletions
|
|
@ -93,3 +93,23 @@ def test_rm_update_register_entry_builds_shared_spine_command(monkeypatch):
|
|||
assert seen["args"][0:2] == ["register", "put"]
|
||||
assert "technical-debt" in seen["args"]
|
||||
assert '{"severity":"high"}' in seen["args"]
|
||||
|
||||
|
||||
def test_rm_scan_sbom_builds_derived_snapshot_command(monkeypatch):
|
||||
seen = {}
|
||||
|
||||
def fake_run(args, *, timeout=120):
|
||||
seen["args"] = args
|
||||
return (
|
||||
0,
|
||||
'{"schema":"repo-manager.sbom-snapshot.v1","ok":true,"entry_count":3}',
|
||||
"",
|
||||
)
|
||||
|
||||
monkeypatch.setattr(adapter, "run_rmgr", fake_run)
|
||||
result = adapter.rm_scan_sbom(repo_path="/repos/demo", repo_slug="demo")
|
||||
|
||||
assert result["ok"] is True
|
||||
assert result["schema"] == "repo-manager.sbom-snapshot.v1"
|
||||
assert result["exit_code"] == 0
|
||||
assert seen["args"] == ["sbom", "scan", "--path", "/repos/demo", "--slug", "demo"]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue