@@ -6,6 +6,8 @@ Feature: Tests for the osm2pgsql-replication script with property table
66 n34 Tamenity=restaurant x77 y45.3
77 """
88 And the replication service at http://example.com/europe/liechtenstein-updates
9+ | sequence | timestamp |
10+ | 9999999 | 2013 -08 -03T19 :00 :02Z |
911 When running osm2pgsql pgsql with parameters
1012 | --slim |
1113
@@ -22,6 +24,8 @@ Feature: Tests for the osm2pgsql-replication script with property table
2224 Scenario : Replication will be initialised from the information of the import file
2325 Given the input file 'liechtenstein-2013-08-03.osm.pbf'
2426 And the replication service at http://example.com/europe/liechtenstein-updates
27+ | sequence | timestamp |
28+ | 9999999 | 2013 -08 -03T19 :00 :02Z |
2529 When running osm2pgsql pgsql with parameters
2630 | --slim |
2731
@@ -65,6 +69,8 @@ Feature: Tests for the osm2pgsql-replication script with property table
6569 Given the database schema foobar
6670 Given the input file 'liechtenstein-2013-08-03.osm.pbf'
6771 And the replication service at http://example.com/europe/liechtenstein-updates
72+ | sequence | timestamp |
73+ | 9999999 | 2013 -08 -03T19 :00 :02Z |
6874 When running osm2pgsql pgsql with parameters
6975 | --slim | --middle -schema =foobar |
7076
@@ -82,6 +88,8 @@ Feature: Tests for the osm2pgsql-replication script with property table
8288 Given the database schema foobar
8389 Given the input file 'liechtenstein-2013-08-03.osm.pbf'
8490 And the replication service at http://example.com/europe/liechtenstein-updates
91+ | sequence | timestamp |
92+ | 9999999 | 2013 -08 -03T19 :00 :02Z |
8593 When running osm2pgsql pgsql with parameters
8694 | --slim | --schema =foobar |
8795
@@ -100,6 +108,8 @@ Feature: Tests for the osm2pgsql-replication script with property table
100108 Given the database schema baz
101109 Given the input file 'liechtenstein-2013-08-03.osm.pbf'
102110 And the replication service at http://example.com/europe/liechtenstein-updates
111+ | sequence | timestamp |
112+ | 9999999 | 2013 -08 -03T19 :00 :02Z |
103113 When running osm2pgsql pgsql with parameters
104114 | --slim | --middle -schema =foobar | --schema =baz |
105115
@@ -220,9 +230,9 @@ Feature: Tests for the osm2pgsql-replication script with property table
220230 Given the input file 'liechtenstein-2013-08-03.osm.pbf'
221231 And the replication service at http://example.com/europe/liechtenstein-updates
222232 | sequence | timestamp |
223- | 345 | 2020 - 10 - 04T01 :00 :00Z |
224- | 346 | 2020 - 10 - 04T02 :00 :00Z |
225- | 347 | 2020 - 10 - 04T03 :00 :00Z |
233+ | 344 | 2013 - 08 - 03T13 :00 :02Z |
234+ | 345 | 2013 - 08 - 03T14 :00 :02Z |
235+ | 346 | 2013 - 08 - 03T15 :00 :02Z |
226236 When running osm2pgsql pgsql with parameters
227237 | --slim |
228238
@@ -370,3 +380,37 @@ Feature: Tests for the osm2pgsql-replication script with property table
370380 "server": {"base_url": "http://example.com/europe/liechtenstein-updates", "sequence": 10000001, "timestamp": "2013-10-01T01:00:00Z"
371381 "local": {"sequence": 9999999, "timestamp": "2013-08-03T19:00:02Z"
372382 """
383+
384+
385+ Scenario : Replication initialisation will fail when diffs are not old enough
386+ Given the database schema foobar
387+ Given the input file 'liechtenstein-2013-08-03.osm.pbf'
388+ And the replication service at http://example.com/europe/liechtenstein-updates
389+ | sequence | timestamp |
390+ | 10000000 | 2020 -01 -01T01 :00 :02Z |
391+ When running osm2pgsql pgsql with parameters
392+ | --slim |
393+
394+ Then running osm2pgsql-replication fails with returncode 1
395+ | init | --server | http ://example .com /europe /liechtenstein -updates |
396+ And the error output contains
397+ """
398+ The replication service does not have diff files for the requested date.
399+ """
400+
401+
402+ Scenario : Replication initialisation will fail when diffs are not old enough
403+ Given the database schema foobar
404+ Given the input file 'liechtenstein-2013-08-03.osm.pbf'
405+ And the replication service at http://example.com/europe/liechtenstein-updates
406+ | sequence | timestamp |
407+ | 10000000 | 2020 -01 -01T01 :00 :02Z |
408+ When running osm2pgsql pgsql with parameters
409+ | --slim |
410+
411+ Then running osm2pgsql-replication fails with returncode 1
412+ | init |
413+ And the error output contains
414+ """
415+ Cannot load state information for 9999999 from replication service http://example.com/europe/liechtenstein-updates.
416+ """
0 commit comments