generated from coulomb/repo-seed
STATE-WP-0062 T5: docs, first-party↔repo test, mark workplan finished
- Add /docs/services reference (two-dimension model, persistence, API) and a pointer note from /docs/tpsc; add it to the Reference nav. - Add a test asserting first_party.repo_slug resolves to a managed_repos FK (8 services tests green). - Mark STATE-WP-0062 tasks done / status finished. Known classes seeded in the live catalog via the API (Gitea, Postgres as self-hosted/third-party; State Hub as self-hosted/first-party at Level 2). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -91,3 +91,18 @@ async def test_first_party_unknown_repo_slug_404(client):
|
||||
async def test_get_unknown_service_404(client):
|
||||
r = await client.get("/services/nope")
|
||||
assert r.status_code == 404
|
||||
|
||||
|
||||
async def test_first_party_repo_slug_links_to_repo(client):
|
||||
await client.post("/domains/", json={"slug": "custodian", "name": "Custodian"})
|
||||
repo = (await client.post("/repos/", json={
|
||||
"domain_slug": "custodian", "slug": "state-hub", "name": "State Hub",
|
||||
})).json()
|
||||
|
||||
r = await client.post("/services/catalog", json=_svc(
|
||||
"state-hub-api", "self_hosted", "first_party",
|
||||
maturity_level=2,
|
||||
first_party={"repo_slug": "state-hub", "owning_domain": "custodian"},
|
||||
))
|
||||
assert r.status_code == 201, r.text
|
||||
assert r.json()["first_party"]["repo_id"] == repo["id"]
|
||||
|
||||
Reference in New Issue
Block a user