feat(api): standardize REST contracts and auth
This commit is contained in:
@@ -59,7 +59,7 @@ def test_meta_project_returns_map_extent(monkeypatch):
|
||||
app.dependency_overrides[module.get_metadata_repository] = lambda: repo
|
||||
client = TestClient(app)
|
||||
|
||||
response = client.get("/api/v1/meta/project")
|
||||
response = client.get("/api/v1/projects/current/metadata")
|
||||
|
||||
assert response.status_code == 200
|
||||
assert response.json()["map_extent"] == {"xmin": 1, "ymin": 2, "xmax": 3, "ymax": 4}
|
||||
@@ -81,7 +81,7 @@ def test_meta_db_health_returns_503_for_postgres_errors(monkeypatch):
|
||||
app.dependency_overrides[module.get_project_timescale_connection] = lambda: DummyTimescaleConnection()
|
||||
client = TestClient(app)
|
||||
|
||||
response = client.get("/api/v1/meta/db/health")
|
||||
response = client.get("/api/v1/projects/current/database-health")
|
||||
|
||||
assert response.status_code == 503
|
||||
assert response.json()["detail"] == "Project PostgreSQL health check failed: pg unavailable"
|
||||
|
||||
Reference in New Issue
Block a user