feat(v1.3.0): Database Concept — collections, pages, views, GiteaBoardCompat
Database foundation: - New tables: collections, collection_pages, collection_views - Router /db with full CRUD API - GiteaBoardCompat adapter for legacy board compatibility - CSRF exemption for /db/ routes - 34/34 tests pass - Version bump 1.0.0 → 1.3.0 - Deployed and verified on Docker port 8080
This commit is contained in:
+11
-2
@@ -34,7 +34,7 @@ def test_health(client):
|
||||
data = resp.json()
|
||||
assert "status" in data
|
||||
assert data["db"] is True
|
||||
assert data["version"] == "1.0.0"
|
||||
assert data["version"] == "1.3.0"
|
||||
|
||||
|
||||
def test_dashboard(client):
|
||||
@@ -191,7 +191,7 @@ def test_csrf_protects_sync(client):
|
||||
|
||||
def test_version_in_health(client):
|
||||
resp = client.get("/api/health")
|
||||
assert resp.json()["version"] == "1.0.0"
|
||||
assert resp.json()["version"] == "1.3.0"
|
||||
|
||||
|
||||
def test_db_tables_exist(client):
|
||||
@@ -347,3 +347,12 @@ def test_collections_db_page_renders(client):
|
||||
|
||||
# Cleanup
|
||||
client.delete(f"/db/api/{coll_id}")
|
||||
|
||||
|
||||
def test_boards_as_collections(client):
|
||||
"""GET /db/boards/api — should list boards as pseudo-collections."""
|
||||
resp = client.get("/db/boards/api")
|
||||
assert resp.status_code == 200
|
||||
data = resp.json()
|
||||
assert "boards" in data
|
||||
assert isinstance(data["boards"], list)
|
||||
|
||||
Reference in New Issue
Block a user