refactor(admin): remove geoserver config

This commit is contained in:
2026-06-12 15:28:14 +08:00
parent a6e7a2e75c
commit d99f4cec6a
14 changed files with 14 additions and 420 deletions
+3 -9
View File
@@ -84,7 +84,7 @@ def test_project_info_returns_404_when_missing(monkeypatch):
assert response.json()["detail"] == "Project missing not found"
def test_project_info_returns_geoserver_payload(monkeypatch):
def test_project_info_returns_project_workspace(monkeypatch):
module = _load_project_module(monkeypatch)
detail = SimpleNamespace(
project_id=uuid4(),
@@ -94,13 +94,6 @@ def test_project_info_returns_geoserver_payload(monkeypatch):
gs_workspace="ws",
map_extent={"xmin": 1, "ymin": 2, "xmax": 3, "ymax": 4},
status="active",
geoserver=SimpleNamespace(
gs_base_url="http://gs",
gs_admin_user="admin",
gs_datastore_name="store",
default_extent={"xmin": 1, "ymin": 2, "xmax": 3, "ymax": 4},
srid=4326,
),
)
repo = SimpleNamespace(get_project_detail_by_code=AsyncMock(return_value=detail))
app = build_test_app(module.router, "/api/v1")
@@ -112,7 +105,8 @@ def test_project_info_returns_geoserver_payload(monkeypatch):
assert response.status_code == 200
payload = response.json()
assert payload["code"] == "demo"
assert payload["geoserver"]["gs_base_url"] == "http://gs"
assert payload["gs_workspace"] == "ws"
assert "geoserver" not in payload
def test_open_project_returns_network_even_when_db_connection_fails(monkeypatch):