]> git.openstreetmap.org Git - nominatim.git/commitdiff
add more interpolation update scenarios (currently failing)
authorSarah Hoffmann <lonvia@denofr.de>
Sun, 26 Feb 2017 12:41:37 +0000 (13:41 +0100)
committerSarah Hoffmann <lonvia@denofr.de>
Sun, 26 Feb 2017 15:46:41 +0000 (16:46 +0100)
test/bdd/api/search/queries.feature
test/bdd/db/update/interpolation.feature
test/bdd/osm2pgsql/update/interpolation.feature [deleted file]

index 0074e3344fe5301f0523742d190394713be36f75..c9b33701759f63292e0884deb8400cdf6e7c5839 100644 (file)
@@ -58,6 +58,7 @@ Feature: Search queries
           | 30 |
 
     # https://trac.openstreetmap.org/ticket/5094
+    @Fail
     Scenario: housenumbers are ordered by complete match first
         When sending json search query "6395 geminis, montevideo" with address
         Then result addresses contain
index 7dd5bdc0de99580fc5febd5768c176d7c84d0b43..0eaa97fdee378b8507391511cfa6cba22833b885 100644 (file)
@@ -2,7 +2,6 @@
 Feature: Update of address interpolations
     Test the interpolated address are updated correctly
 
-    @wip
     Scenario: new interpolation added to existing street
       Given the scene parallel-road
       And the places
@@ -267,3 +266,92 @@ Feature: Update of address interpolations
       Then W1 expands to interpolation
           | parent_place_id | start | end |
           | W2              | 2     | 6 |
+
+    @Fail
+    Scenario: housenumber added in middle of interpolation
+      Given the grid
+          | 1 |  |  |   |  | 2 |
+          | 3 |  |  | 4 |  | 5 |
+      And the places
+          | osm | class   | type         | name         | geometry |
+          | W1  | highway | unclassified | Cloud Street | 1, 2     |
+      And the ways
+          | id  | nodes |
+          | 2   | 3,4,5 |
+      And the places
+          | osm | class   | type    | housenr | geometry |
+          | W2  | place   | houses  | even    | 3,4,5    |
+      And the places
+          | osm | class | type  | housenr |
+          | N3  | place | house | 2       |
+          | N5  | place | house | 10      |
+      When importing
+      Then W2 expands to interpolation
+          | parent_place_id | start | end | geometry |
+          | W1              | 2     | 10  | 3,4,5    |
+      When updating places
+          | osm | class | type  | housenr |
+          | N4  | place | house | 6       |
+      Then W2 expands to interpolation
+          | parent_place_id | start | end | geometry |
+          | W1              | 2     | 6   | 3,4      |
+          | W1              | 6     | 10  | 4,5      |
+
+    @Fail
+    Scenario: housenumber removed in middle of interpolation
+      Given the grid
+          | 1 |  |  |   |  | 2 |
+          | 3 |  |  | 4 |  | 5 |
+      And the places
+          | osm | class   | type         | name         | geometry |
+          | W1  | highway | unclassified | Cloud Street | 1, 2     |
+      And the ways
+          | id  | nodes |
+          | 2   | 3,4,5 |
+      And the places
+          | osm | class   | type    | housenr | geometry |
+          | W2  | place   | houses  | even    | 3,4,5    |
+      And the places
+          | osm | class | type  | housenr |
+          | N3  | place | house | 2       |
+          | N4  | place | house | 6       |
+          | N5  | place | house | 10      |
+      When importing
+      Then W2 expands to interpolation
+          | parent_place_id | start | end | geometry |
+          | W1              | 2     | 6   | 3,4      |
+          | W1              | 6     | 10  | 4,5      |
+      When marking for delete N4
+      Then W2 expands to interpolation
+          | parent_place_id | start | end | geometry |
+          | W1              | 2     | 10  | 3,4,5    |
+
+    @Fail
+    Scenario: Change the start housenumber
+      Given the grid
+          | 1 |  | 2 |
+          | 3 |  | 4 |
+      And the places
+          | osm | class   | type         | name         | geometry |
+          | W1  | highway | unclassified | Cloud Street | 1, 2     |
+      And the ways
+          | id  | nodes |
+          | 2   | 3,4   |
+      And the places
+          | osm | class   | type    | housenr | geometry |
+          | W2  | place   | houses  | even    | 3,4      |
+      And the places
+          | osm | class | type  | housenr |
+          | N3  | place | house | 2       |
+          | N4  | place | house | 6       |
+      When importing
+      Then W2 expands to interpolation
+          | parent_place_id | start | end | geometry |
+          | W1              | 2     | 6   | 3,4      |
+      When updating places
+          | osm | class | type  | housenr |
+          | N4  | place | house | 8       |
+      Then W2 expands to interpolation
+          | parent_place_id | start | end | geometry |
+          | W1              | 2     | 8   | 3,4      |
+
diff --git a/test/bdd/osm2pgsql/update/interpolation.feature b/test/bdd/osm2pgsql/update/interpolation.feature
deleted file mode 100644 (file)
index 3cb1929..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-@DB
-Feature: Update of interpolations
-
-    @wip
-    # Test case for #598
-    Scenario: add an interpolation way
-        Given the grid
-          | 4 | 7 | 5 |
-          | 10|   | 12|
-        When loading osm data
-          """
-          n3
-          n4 Taddr:housenumber=1
-          n5 Taddr:housenumber=5
-          n10
-          n12
-          w11 Thighway=residential,name=X Nn4,n5
-          w12 Thighway=residential,name=Highway Nn10,n12
-          """
-        And updating osm data
-          """
-          n4 Taddr:housenumber=1
-          n5 Taddr:housenumber=5
-          w1 Taddr:interpolation=odd Nn4,n5
-          w2 Tbuilding=yes,name=ggg Nn4,n10,n7,n4
-          w3 Tbuilding=yes,name=ggg Nn4,n10,n7,n4
-          w4 Tbuilding=yes,name=ggg Nn4,n10,n7,n4
-          w5 Tbuilding=yes,name=ggg Nn4,n10,n7,n4
-          w6 Tbuilding=yes,name=ggg Nn4,n10,n7,n4
-          w7 Tbuilding=yes,name=ggg Nn4,n10,n7,n4
-          w11 dD
-          """
-        Then place contains
-          | object   | housenumber |
-          | N4:place | 1           |
-          | N5:place | 5           |
-          | W1:place | odd         |
-        And W1 expands to interpolation
-          | start | end |
-          | 1     | 5   |