bdd: add osm2pgsql tests for updating interpolations

This commit is contained in:
Sarah Hoffmann
2022-11-14 16:57:31 +01:00
parent a46348da38
commit d8e3ba3b54
2 changed files with 178 additions and 0 deletions

View File

@@ -0,0 +1,133 @@
@DB
Feature: Updates of address interpolation objects
Test that changes to address interpolation objects are correctly
propagated.
Background:
Given the grid
| 1 | 2 |
Scenario: Adding a new interpolation
When loading osm data
"""
n1 Taddr:housenumber=3
n2 Taddr:housenumber=17
"""
Then place contains
| object | type |
| N1:place | house |
| N2:place | house |
When updating osm data
"""
w99 Taddr:interpolation=odd Nn1,n2
"""
Then place contains
| object | type |
| N1:place | house |
| N2:place | house |
| W99:place | houses |
When indexing
Then placex contains exactly
| object | type |
| N1:place | house |
| N2:place | house |
Then location_property_osmline contains exactly
| object |
| 99:5 |
Scenario: Delete an existing interpolation
When loading osm data
"""
n1 Taddr:housenumber=2
n2 Taddr:housenumber=7
w99 Taddr:interpolation=odd Nn1,n2
"""
Then place contains
| object | type |
| N1:place | house |
| N2:place | house |
| W99:place | houses |
When updating osm data
"""
w99 v2 dD
"""
Then place contains
| object | type |
| N1:place | house |
| N2:place | house |
When indexing
Then placex contains exactly
| object | type |
| N1:place | house |
| N2:place | house |
Then location_property_osmline contains exactly
| object | indexed_status |
Scenario: Changing an object to an interpolation
When loading osm data
"""
n1 Taddr:housenumber=3
n2 Taddr:housenumber=17
w99 Thighway=residential Nn1,n2
"""
Then place contains
| object | type |
| N1:place | house |
| N2:place | house |
| W99:highway | residential |
When updating osm data
"""
w99 Taddr:interpolation=odd Nn1,n2
"""
Then place contains
| object | type |
| N1:place | house |
| N2:place | house |
| W99:place | houses |
When indexing
Then placex contains exactly
| object | type |
| N1:place | house |
| N2:place | house |
And location_property_osmline contains exactly
| object |
| 99:5 |
Scenario: Changing an interpolation to something else
When loading osm data
"""
n1 Taddr:housenumber=3
n2 Taddr:housenumber=17
w99 Taddr:interpolation=odd Nn1,n2
"""
Then place contains
| object | type |
| N1:place | house |
| N2:place | house |
| W99:place | houses |
When updating osm data
"""
w99 Thighway=residential Nn1,n2
"""
Then place contains
| object | type |
| N1:place | house |
| N2:place | house |
| W99:highway | residential |
When indexing
Then placex contains exactly
| object | type |
| N1:place | house |
| N2:place | house |
| W99:highway | residential |
And location_property_osmline contains exactly
| object |