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