Harden registry API and schema validation

This commit is contained in:
2026-05-17 22:33:21 +02:00
parent 5c20f62fbb
commit bc73b05566
9 changed files with 232 additions and 30 deletions

View File

@@ -143,6 +143,8 @@ def test_registry_http_service_serves_queries(tmp_path: Path) -> None:
with urllib.request.urlopen(f"{base_url}/health", timeout=5) as response:
assert json.loads(response.read())["status"] == "ok"
with urllib.request.urlopen(f"{base_url}/status", timeout=5) as response:
status_payload = json.loads(response.read())
with urllib.request.urlopen(
f"{base_url}/repositories/railiance-fabric/snapshots",
timeout=5,
@@ -211,6 +213,8 @@ def test_registry_http_service_serves_queries(tmp_path: Path) -> None:
library_projection_payload = json.loads(response.read())
assert providers_payload[0]["provider_id"] == "railiance-platform.openbao.runtime-secrets"
assert snapshots_payload[0]["commit"] == "test-cli-2"
assert status_payload["counts"]["repositories"] == 1
assert status_payload["counts"]["snapshots"] == 3
assert drift_payload["graph"]["removed_nodes"]
assert artifact_payload["name"] == "OpenBao KV API"
assert artifacts_payload[0]["artifact_type"] == "openapi"