Skip to content

Commit 616d015

Browse files
committed
Make sure we are always testing with an empty grid in --append tests
1 parent 34d5265 commit 616d015

File tree

8 files changed

+95
-43
lines changed

8 files changed

+95
-43
lines changed

tests/bdd/flex/relation-changes.feature

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ Feature: Handling changes to relations
3232
| --slim |
3333
Then table osm2pgsql_test_relations has 0 rows
3434

35-
Given the OSM data
35+
Given an empty grid
36+
And the OSM data
3637
"""
3738
r30 v2 dV Ttype=multipolygon Mw20@,w21@
3839
"""
@@ -55,7 +56,8 @@ Feature: Handling changes to relations
5556
| --slim |
5657
Then table osm2pgsql_test_relations has 0 rows
5758

58-
Given the OSM data
59+
Given an empty grid
60+
And the OSM data
5961
"""
6062
w21 v2 dV Nn12,n13,n10
6163
"""
@@ -77,7 +79,8 @@ Feature: Handling changes to relations
7779
| --slim |
7880
Then table osm2pgsql_test_relations has 0 rows
7981

80-
Given the OSM data
82+
Given an empty grid
83+
And the OSM data
8184
"""
8285
n12 v2 dV x10.1 y10.1
8386
"""
@@ -100,7 +103,8 @@ Feature: Handling changes to relations
100103
| --slim |
101104
Then table osm2pgsql_test_relations has 0 rows
102105

103-
Given the OSM data
106+
Given an empty grid
107+
And the OSM data
104108
"""
105109
r30 v2 dV Ttype=multipolygon Mw20@,w21@
106110
"""
@@ -123,7 +127,8 @@ Feature: Handling changes to relations
123127
| --slim |
124128
Then table osm2pgsql_test_relations has 1 row
125129

126-
Given the OSM data
130+
Given an empty grid
131+
And the OSM data
127132
"""
128133
r30 v2 dV Mw20@,w21@
129134
"""
@@ -146,7 +151,8 @@ Feature: Handling changes to relations
146151
| --slim |
147152
Then table osm2pgsql_test_relations has 1 row
148153

149-
Given the OSM data
154+
Given an empty grid
155+
And the OSM data
150156
"""
151157
w21 v2 dV <new nodelist>
152158
"""
@@ -174,7 +180,8 @@ Feature: Handling changes to relations
174180
| --slim |
175181
Then table osm2pgsql_test_relations has 1 row
176182

177-
Given the OSM data
183+
Given an empty grid
184+
And the OSM data
178185
"""
179186
n12 v2 dV <new coordinates>
180187
"""
@@ -202,7 +209,8 @@ Feature: Handling changes to relations
202209
| --slim |
203210
Then table osm2pgsql_test_relations has 1 row
204211

205-
Given the OSM data
212+
Given an empty grid
213+
And the OSM data
206214
"""
207215
r30 v2 dV Ttype=multipolygon <new memberlist>
208216
"""
@@ -232,7 +240,8 @@ Feature: Handling changes to relations
232240
| area_id | tags->'natural' | tags->'landuse' |
233241
| -30 | wood | NULL |
234242

235-
Given the OSM data
243+
Given an empty grid
244+
And the OSM data
236245
"""
237246
r30 v2 dV Ttype=multipolygon,landuse=forest Mw20@,w21@
238247
"""

tests/bdd/flex/way-add.feature

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ Feature: Adding ways to a flex database
3131

3232

3333
Scenario: way is not relevant
34-
Given the OSM data
34+
Given an empty grid
35+
And the OSM data
3536
"""
3637
w10 v1 dV Tt=ag Nn10,n11
3738
r30 v2 dV Tt=ag Mw10@,w11@,w12@mark,w13@,w14@mark
@@ -52,7 +53,8 @@ Feature: Adding ways to a flex database
5253

5354

5455
Scenario: add to t1
55-
Given the OSM data
56+
Given an empty grid
57+
And the OSM data
5658
"""
5759
w10 v1 dV Tt1=yes Nn10,n11
5860
r30 v2 dV Tt=ag Mw10@,w11@,w12@mark,w13@,w14@mark
@@ -74,7 +76,8 @@ Feature: Adding ways to a flex database
7476

7577

7678
Scenario: add to t2
77-
Given the OSM data
79+
Given an empty grid
80+
And the OSM data
7881
"""
7982
w10 v1 dV Tt2=yes Nn10,n11
8083
r30 v2 dV Tt=ag Mw10@mark,w11@,w12@mark,w13@,w14@mark
@@ -96,7 +99,8 @@ Feature: Adding ways to a flex database
9699

97100

98101
Scenario: add to t1 and t2
99-
Given the OSM data
102+
Given an empty grid
103+
And the OSM data
100104
"""
101105
w10 v1 dV Tt1=yes,t2=yes Nn10,n11
102106
r30 v2 dV Tt=ag Mw10@mark,w11@,w12@mark,w13@,w14@mark
@@ -119,7 +123,8 @@ Feature: Adding ways to a flex database
119123

120124

121125
Scenario: add to tboth (only stage1)
122-
Given the OSM data
126+
Given an empty grid
127+
And the OSM data
123128
"""
124129
w10 v1 dV Ttboth=yes Nn10,n11
125130
r30 v2 dV Tt=ag Mw10@,w11@,w12@mark,w13@,w14@mark
@@ -141,7 +146,8 @@ Feature: Adding ways to a flex database
141146

142147

143148
Scenario: add to tboth (stage1 and stage2)
144-
Given the OSM data
149+
Given an empty grid
150+
And the OSM data
145151
"""
146152
w10 v1 dV Ttboth=yes Nn10,n11
147153
r30 v2 dV Tt=ag Mw10@mark,w11@,w12@mark,w13@,w14@mark

tests/bdd/flex/way-change.feature

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ Feature: Changing ways in a flex database
3131
| 13 |
3232
| 14 |
3333

34-
Given the OSM data
34+
Given an empty grid
35+
And the OSM data
3536
"""
3637
<input>
3738
"""
@@ -83,7 +84,8 @@ Feature: Changing ways in a flex database
8384
| 13 |
8485
| 14 |
8586

86-
Given the OSM data
87+
Given an empty grid
88+
And the OSM data
8789
"""
8890
<input>
8991
"""
@@ -136,7 +138,8 @@ Feature: Changing ways in a flex database
136138
| 13 |
137139
| 14 |
138140

139-
Given the OSM data
141+
Given an empty grid
142+
And the OSM data
140143
"""
141144
<input>
142145
"""
@@ -193,7 +196,8 @@ Feature: Changing ways in a flex database
193196
| 13 | NULL |
194197
| 14 | {30} |
195198

196-
Given the OSM data
199+
Given an empty grid
200+
And the OSM data
197201
"""
198202
<input>
199203
"""
@@ -239,7 +243,8 @@ Feature: Changing ways in a flex database
239243
| 13 | NULL |
240244
| 14 | {30} |
241245

242-
Given the OSM data
246+
Given an empty grid
247+
And the OSM data
243248
"""
244249
w10 v2 dV Tt1=yes,t2=yes,tboth=yes Nn10,n11
245250
"""

tests/bdd/flex/way-del.feature

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ Feature: Deleting ways in a 2-stage flex database
3131
| 13 |
3232
| 14 |
3333

34-
Given the OSM data
34+
Given an empty grid
35+
And the OSM data
3536
"""
3637
w10 v2 dD
3738
"""
@@ -73,7 +74,8 @@ Feature: Deleting ways in a 2-stage flex database
7374
| 13 |
7475
| 14 |
7576

76-
Given the OSM data
77+
Given an empty grid
78+
And the OSM data
7779
"""
7880
w10 v2 dD
7981
"""
@@ -115,7 +117,8 @@ Feature: Deleting ways in a 2-stage flex database
115117
| 13 |
116118
| 14 |
117119

118-
Given the OSM data
120+
Given an empty grid
121+
And the OSM data
119122
"""
120123
w10 v2 dD
121124
"""
@@ -156,7 +159,8 @@ Feature: Deleting ways in a 2-stage flex database
156159
| 13 |
157160
| 14 |
158161

159-
Given the OSM data
162+
Given an empty grid
163+
And the OSM data
160164
"""
161165
w10 v2 dD
162166
"""
@@ -198,7 +202,8 @@ Feature: Deleting ways in a 2-stage flex database
198202
| 13 |
199203
| 14 |
200204

201-
Given the OSM data
205+
Given an empty grid
206+
And the OSM data
202207
"""
203208
w10 v2 dD
204209
"""
@@ -240,7 +245,8 @@ Feature: Deleting ways in a 2-stage flex database
240245
| 13 |
241246
| 14 |
242247

243-
Given the OSM data
248+
Given an empty grid
249+
And the OSM data
244250
"""
245251
w10 v2 dD
246252
"""
@@ -283,7 +289,8 @@ Feature: Deleting ways in a 2-stage flex database
283289
| 13 |
284290
| 14 |
285291

286-
Given the OSM data
292+
Given an empty grid
293+
And the OSM data
287294
"""
288295
w10 v2 dD
289296
"""
@@ -325,7 +332,8 @@ Feature: Deleting ways in a 2-stage flex database
325332
| 13 |
326333
| 14 |
327334

328-
Given the OSM data
335+
Given an empty grid
336+
And the OSM data
329337
"""
330338
w10 v2 dD
331339
"""

tests/bdd/flex/way-relation-add.feature

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ Feature: Adding relations to a 2-stage flex database
3434
| 13 |
3535
| 14 |
3636

37-
Given the OSM data
37+
Given an empty grid
38+
And the OSM data
3839
"""
3940
r32 v2 dV Tt=ag Mw10@mark,w11@,w12@,w13@,w14@,w15@
4041
"""
@@ -85,7 +86,8 @@ Feature: Adding relations to a 2-stage flex database
8586
| 13 |
8687
| 14 |
8788

88-
Given the OSM data
89+
Given an empty grid
90+
And the OSM data
8991
"""
9092
r32 v2 dV Tt=ag Mw10@mark,w11@,w12@,w13@,w14@,w15@
9193
"""
@@ -131,7 +133,8 @@ Feature: Adding relations to a 2-stage flex database
131133
| 13 |
132134
| 14 |
133135

134-
Given the OSM data
136+
Given an empty grid
137+
And the OSM data
135138
"""
136139
r32 v2 dV Tt=ag Mw10@mark,w11@,w12@,w13@,w14@,w15@
137140
"""
@@ -177,7 +180,8 @@ Feature: Adding relations to a 2-stage flex database
177180
| 13 | NULL |
178181
| 14 | {30} |
179182

180-
Given the OSM data
183+
Given an empty grid
184+
And the OSM data
181185
"""
182186
r32 v2 dV Tt=ag Mw10@mark,w11@,w12@,w13@,w14@,w15@
183187
"""
@@ -227,7 +231,8 @@ Feature: Adding relations to a 2-stage flex database
227231
| 13 | NULL |
228232
| 14 | {30} |
229233

230-
Given the OSM data
234+
Given an empty grid
235+
And the OSM data
231236
"""
232237
r32 v2 dV Tt=ag Mw10@mark,w11@,w12@,w13@,w14@,w15@
233238
"""
@@ -272,7 +277,8 @@ Feature: Adding relations to a 2-stage flex database
272277
| 13 |
273278
| 14 |
274279

275-
Given the OSM data
280+
Given an empty grid
281+
And the OSM data
276282
"""
277283
r32 v2 dV Tt=ag Mw10@,w11@,w12@,w13@,w14@,w15@
278284
"""
@@ -322,7 +328,8 @@ Feature: Adding relations to a 2-stage flex database
322328
| 13 |
323329
| 14 |
324330

325-
Given the OSM data
331+
Given an empty grid
332+
And the OSM data
326333
"""
327334
r32 v2 dV Tt=ag Mw10@mark,w11@,w12@,w13@,w14@,w15@
328335
"""
@@ -368,7 +375,8 @@ Feature: Adding relations to a 2-stage flex database
368375
| 13 |
369376
| 14 |
370377

371-
Given the OSM data
378+
Given an empty grid
379+
And the OSM data
372380
"""
373381
r32 v2 dV Tt=ag Mw10@,w11@,w12@,w13@,w14@,w15@
374382
"""
@@ -414,7 +422,8 @@ Feature: Adding relations to a 2-stage flex database
414422
| 13 | NULL |
415423
| 14 | {30} |
416424

417-
Given the OSM data
425+
Given an empty grid
426+
And the OSM data
418427
"""
419428
r32 v2 dV Tt=ag Mw10@,w11@,w12@,w13@,w14@,w15@
420429
"""
@@ -459,7 +468,8 @@ Feature: Adding relations to a 2-stage flex database
459468
| 13 | NULL |
460469
| 14 | {30} |
461470

462-
Given the OSM data
471+
Given an empty grid
472+
And the OSM data
463473
"""
464474
r32 v2 dV Tt=ag Mw10@,w11@,w12@,w13@,w14@,w15@
465475
"""

0 commit comments

Comments
 (0)