fix(v2): enforce repository protocol safety

This commit is contained in:
2026-07-27 21:10:26 +02:00
parent 175a550c7b
commit 908859084a
4 changed files with 76 additions and 19 deletions
+1 -1
View File
@@ -45,7 +45,7 @@ def test_repository_inspection_rejects_noncanonical_metadata(tmp_path: Path) ->
'{"encryption":"none","compression":"none","format_version":1}\n'
)
with pytest.raises(RepositoryError, match="canonical"):
inspect_repository(result.root)
inspect_repository(settings, result.root)
@pytest.mark.asyncio
+2 -1
View File
@@ -148,7 +148,8 @@ async def test_logout_revocation_survives_app_restart(tmp_path) -> None:
transport=ASGITransport(restarted), base_url=settings.public_base_url
) as client:
rejected = await client.get(
"/api/v2/auth/session", headers={"Cookie": f"backup_tool_session={copied_cookie}"}
"/api/v2/auth/session",
headers={"Cookie": f"backup_tool_session={copied_cookie}"},
)
assert rejected.status_code == 401
await restarted.state.engine.dispose()