fix(map): read all relevant selection sources
This commit is contained in:
@@ -64,9 +64,13 @@ def test_coverage_catalog_uses_normalized_contracts_and_does_not_change_provider
|
||||
"rbins_marine_reporting_units",
|
||||
"rbins_msp_2026",
|
||||
"mdk_bathymetry",
|
||||
"vmm_vha_bathymetry_profiles",
|
||||
}
|
||||
assert next(source for source in catalog.sources if source.source_name == "ngi_adminvector").license_note == "CC BY 4.0"
|
||||
assert next(source for source in catalog.sources if source.source_name == "mdk_bathymetry").integration_status == "not_configured"
|
||||
assert next(
|
||||
source for source in catalog.sources if source.source_name == "vmm_vha_bathymetry_profiles"
|
||||
).integration_status == "operational"
|
||||
|
||||
response = TestClient(app).get("/api/v1/external/coverage/catalog")
|
||||
assert response.status_code == 200
|
||||
@@ -268,6 +272,43 @@ def test_spw_bathymetry_materialization_is_source_specific() -> None:
|
||||
assert with_bathymetry.items[0].materialized_dataset_ids == [bathymetry_id]
|
||||
|
||||
|
||||
def test_vha_bathymetry_profiles_are_operational_only_inside_the_persisted_selection() -> None:
|
||||
project_id = uuid4()
|
||||
scope = [
|
||||
scope_area("Belgium land", box(2.5, 49.5, 6.4, 51.5)),
|
||||
scope_area("Flanders", box(2.5, 50.7, 5.9, 51.5)),
|
||||
]
|
||||
selection = CoverageBBox(minx=5.101, miny=51.171, maxx=5.109, maxy=51.179)
|
||||
without_profiles = CoverageRegistryService.resolve(
|
||||
FakeSession(project=SimpleNamespace(id=project_id), areas=scope, datasets=[]),
|
||||
project_id,
|
||||
selection,
|
||||
["bathymetry"],
|
||||
)
|
||||
assert without_profiles.items[0].status == "partial"
|
||||
assert without_profiles.items[0].source_names == ["vmm_vha_bathymetry_profiles"]
|
||||
|
||||
profile_id = uuid4()
|
||||
profiles = SimpleNamespace(
|
||||
id=profile_id,
|
||||
status="ready",
|
||||
source_name="vmm_vha_bathymetry_profiles",
|
||||
reference_layer_name="bathymetry_profile_points",
|
||||
source_metadata={
|
||||
"coverage_zones": ["flanders"],
|
||||
"bbox_epsg4326": [5.1, 51.17, 5.11, 51.18],
|
||||
},
|
||||
)
|
||||
with_profiles = CoverageRegistryService.resolve(
|
||||
FakeSession(project=SimpleNamespace(id=project_id), areas=scope, datasets=[profiles]),
|
||||
project_id,
|
||||
selection,
|
||||
["bathymetry"],
|
||||
)
|
||||
assert with_profiles.items[0].status == "operational"
|
||||
assert with_profiles.items[0].materialized_dataset_ids == [profile_id]
|
||||
|
||||
|
||||
def test_mixed_land_and_north_sea_selection_remains_split() -> None:
|
||||
project_id = uuid4()
|
||||
project = SimpleNamespace(id=project_id)
|
||||
|
||||
Reference in New Issue
Block a user