|
| 1 | +Feature: Tests for the osm2pgsql-replication script with schemas |
| 2 | + |
| 3 | + Scenario: Replication updates work on database with schema |
| 4 | + Given the input file 'liechtenstein-2013-08-03.osm.pbf' |
| 5 | + And the database schema foobar |
| 6 | + And the replication service at http://example.com/europe/liechtenstein-updates |
| 7 | + | sequence | timestamp | |
| 8 | + | 9999999 | 2013-08-01T01:00:02Z | |
| 9 | + | 10000000 | 2013-09-01T01:00:00Z | |
| 10 | + | 10000001 | 2013-10-01T01:00:00Z | |
| 11 | + When running osm2pgsql pgsql with parameters |
| 12 | + | --slim | --schema | foobar | |
| 13 | + And running osm2pgsql-replication |
| 14 | + | init | --schema | foobar | |
| 15 | + And running osm2pgsql-replication |
| 16 | + | update | --schema | foobar | |
| 17 | + |
| 18 | + Then table foobar.osm2pgsql_properties contains |
| 19 | + | property | value | |
| 20 | + | replication_base_url | http://example.com/europe/liechtenstein-updates | |
| 21 | + | replication_sequence_number | 10000001 | |
| 22 | + | replication_timestamp | 2013-10-01T01:00:00Z | |
| 23 | + |
| 24 | + |
| 25 | + Scenario: Replication updates work on database with different middle schema |
| 26 | + Given the input file 'liechtenstein-2013-08-03.osm.pbf' |
| 27 | + And the database schema foobar |
| 28 | + And the replication service at http://example.com/europe/liechtenstein-updates |
| 29 | + | sequence | timestamp | |
| 30 | + | 9999999 | 2013-08-01T01:00:02Z | |
| 31 | + | 10000000 | 2013-09-01T01:00:00Z | |
| 32 | + | 10000001 | 2013-10-01T01:00:00Z | |
| 33 | + When running osm2pgsql pgsql with parameters |
| 34 | + | --slim | --middle-schema | foobar | |
| 35 | + And running osm2pgsql-replication |
| 36 | + | init | --middle-schema | foobar | |
| 37 | + And running osm2pgsql-replication |
| 38 | + | update | --middle-schema | foobar | |
| 39 | + |
| 40 | + Then table foobar.osm2pgsql_properties contains |
| 41 | + | property | value | |
| 42 | + | replication_base_url | http://example.com/europe/liechtenstein-updates | |
| 43 | + | replication_sequence_number | 10000001 | |
| 44 | + | replication_timestamp | 2013-10-01T01:00:00Z | |
| 45 | + |
| 46 | + |
| 47 | + Scenario: Replication updates work on database with middle schema different from schema |
| 48 | + Given the input file 'liechtenstein-2013-08-03.osm.pbf' |
| 49 | + And the database schema foobar |
| 50 | + And the database schema baz |
| 51 | + And the replication service at http://example.com/europe/liechtenstein-updates |
| 52 | + | sequence | timestamp | |
| 53 | + | 9999999 | 2013-08-01T01:00:02Z | |
| 54 | + | 10000000 | 2013-09-01T01:00:00Z | |
| 55 | + | 10000001 | 2013-10-01T01:00:00Z | |
| 56 | + When running osm2pgsql pgsql with parameters |
| 57 | + | --slim | --middle-schema | foobar | --schema | baz | |
| 58 | + And running osm2pgsql-replication |
| 59 | + | init | --middle-schema | foobar | --schema | baz | |
| 60 | + And running osm2pgsql-replication |
| 61 | + | update | --middle-schema | foobar | --schema | baz | |
| 62 | + |
| 63 | + Then table foobar.osm2pgsql_properties contains |
| 64 | + | property | value | |
| 65 | + | replication_base_url | http://example.com/europe/liechtenstein-updates | |
| 66 | + | replication_sequence_number | 10000001 | |
| 67 | + | replication_timestamp | 2013-10-01T01:00:00Z | |
| 68 | + |
0 commit comments