]> git.openstreetmap.org Git - nominatim.git/blob - test/bdd/osm2pgsql/update/simple.feature
Merge pull request #2856 from t-tomek/patch-1
[nominatim.git] / test / bdd / osm2pgsql / update / simple.feature
1 @DB
2 Feature: Update of simple objects by osm2pgsql
3     Testing basic update functions of osm2pgsql.
4
5     Scenario: Adding a new object
6         When loading osm data
7           """
8           n1 Tplace=town,name=Middletown
9           """
10         Then place contains exactly
11           | object   | type | name+name  |
12           | N1:place | town | Middletown |
13
14        When updating osm data
15          """
16          n2 Tamenity=hotel,name=Posthotel
17          """
18         Then place contains exactly
19           | object     | type  | name+name  |
20           | N1:place   | town  | Middletown |
21           | N2:amenity | hotel | Posthotel  |
22         And placex contains exactly
23           | object     | type  | name+name  | indexed_status |
24           | N1:place   | town  | Middletown | 0              |
25           | N2:amenity | hotel | Posthotel  | 1              |
26
27
28     Scenario: Deleting an existing object
29         When loading osm data
30           """
31           n1 Tplace=town,name=Middletown
32           n2 Tamenity=hotel,name=Posthotel
33           """
34         Then place contains exactly
35           | object     | type  | name+name  |
36           | N1:place   | town  | Middletown |
37           | N2:amenity | hotel | Posthotel  |
38
39        When updating osm data
40          """
41          n2 dD
42          """
43         Then place contains exactly
44           | object     | type  | name+name  |
45           | N1:place   | town  | Middletown |
46         And placex contains exactly
47           | object     | type  | name+name  | indexed_status |
48           | N1:place   | town  | Middletown | 0              |
49           | N2:amenity | hotel | Posthotel  | 100            |