feat(projects): automate project infrastructure provisioning
Generic Container CI/CD / test-build-publish (push) Successful in 1m13s
Server CI/CD v2 / build-test-publish-and-deploy (push) Successful in 1m13s

This commit is contained in:
2026-09-11 10:57:51 +08:00
parent 10a7a66a41
commit 90b02057bc
38 changed files with 2345 additions and 189 deletions
+31
View File
@@ -0,0 +1,31 @@
from app.native.wndb.core.model_replace import _copy_out_statement
def test_copy_out_statement_relabels_project_geometry_to_target_srid() -> None:
statement = _copy_out_statement(
"gis",
"labels",
["id", "label", "geom"],
source_geometry_srids={"geom": 900914},
target_geometry_srids={"geom": 990001},
)
assert statement.as_string(None) == (
'copy (select "id", "label", '
'st_setsrid("geom", 990001) as "geom" '
'from "gis"."labels") to stdout'
)
def test_copy_out_statement_keeps_direct_copy_when_srid_matches() -> None:
statement = _copy_out_statement(
"gis",
"node_geometries",
["node_id", "geom"],
source_geometry_srids={"geom": 900914},
target_geometry_srids={"geom": 900914},
)
assert statement.as_string(None) == (
'copy "gis"."node_geometries" ("node_id", "geom") to stdout'
)