|
| 1 | +Feature: Timestamps in properties table should reflect timestamps in input file |
| 2 | + |
| 3 | + Scenario: Create database with timestamps |
| 4 | + Given the OSM data |
| 5 | + """ |
| 6 | + n10 t2020-01-02T03:04:05Z x10 y10 |
| 7 | + n11 t2020-01-02T03:04:05Z x10 y11 |
| 8 | + w20 t2020-01-02T03:04:06Z Thighway=primary Nn10,n11 |
| 9 | + """ |
| 10 | + When running osm2pgsql pgsql |
| 11 | + |
| 12 | + Then table osm2pgsql_properties has 7 rows |
| 13 | + And table osm2pgsql_properties contains |
| 14 | + | property | value | |
| 15 | + | attributes | false | |
| 16 | + | flat_node_file | | |
| 17 | + | prefix | planet_osm | |
| 18 | + | updatable | false | |
| 19 | + | import_timestamp | 2020-01-02T03:04:06Z | |
| 20 | + | current_timestamp | 2020-01-02T03:04:06Z | |
| 21 | + |
| 22 | + Scenario: Create database without timestamps |
| 23 | + Given the OSM data |
| 24 | + """ |
| 25 | + n10 x10 y10 |
| 26 | + n11 x10 y11 |
| 27 | + w20 Thighway=primary Nn10,n11 |
| 28 | + """ |
| 29 | + When running osm2pgsql pgsql |
| 30 | + |
| 31 | + Then table osm2pgsql_properties has 5 rows |
| 32 | + Then table osm2pgsql_properties contains |
| 33 | + | property | value | |
| 34 | + | attributes | false | |
| 35 | + | flat_node_file | | |
| 36 | + | prefix | planet_osm | |
| 37 | + | updatable | false | |
| 38 | + |
| 39 | + Scenario: Create and update database with timestamps |
| 40 | + Given the OSM data |
| 41 | + """ |
| 42 | + n10 v1 t2020-01-02T03:04:05Z x10 y10 |
| 43 | + n11 v1 t2020-01-02T03:04:05Z x10 y11 |
| 44 | + w20 v1 t2020-01-02T03:04:06Z Thighway=primary Nn10,n11 |
| 45 | + """ |
| 46 | + |
| 47 | + When running osm2pgsql pgsql with parameters |
| 48 | + | --create | --slim | |
| 49 | + |
| 50 | + Then table osm2pgsql_properties has 7 rows |
| 51 | + And table osm2pgsql_properties contains |
| 52 | + | property | value | |
| 53 | + | attributes | false | |
| 54 | + | flat_node_file | | |
| 55 | + | prefix | planet_osm | |
| 56 | + | updatable | true | |
| 57 | + | import_timestamp | 2020-01-02T03:04:06Z | |
| 58 | + | current_timestamp | 2020-01-02T03:04:06Z | |
| 59 | + |
| 60 | + Given the OSM data |
| 61 | + """ |
| 62 | + n11 v2 t2020-01-02T03:06:05Z x10 y12 |
| 63 | + w20 v2 t2020-01-02T03:05:06Z Thighway=secondary Nn10,n11 |
| 64 | + """ |
| 65 | + |
| 66 | + When running osm2pgsql pgsql with parameters |
| 67 | + | --append | --slim | |
| 68 | + |
| 69 | + Then table osm2pgsql_properties has 7 rows |
| 70 | + And table osm2pgsql_properties contains |
| 71 | + | property | value | |
| 72 | + | attributes | false | |
| 73 | + | flat_node_file | | |
| 74 | + | prefix | planet_osm | |
| 75 | + | updatable | true | |
| 76 | + | import_timestamp | 2020-01-02T03:04:06Z | |
| 77 | + | current_timestamp | 2020-01-02T03:06:05Z | |
| 78 | + |
| 79 | + Scenario: Create database with timestamps and update without timestamps |
| 80 | + Given the OSM data |
| 81 | + """ |
| 82 | + n10 v1 t2020-01-02T03:04:05Z x10 y10 |
| 83 | + n11 v1 t2020-01-02T03:04:05Z x10 y11 |
| 84 | + w20 v1 t2020-01-02T03:04:06Z Thighway=primary Nn10,n11 |
| 85 | + """ |
| 86 | + |
| 87 | + When running osm2pgsql pgsql with parameters |
| 88 | + | --create | --slim | |
| 89 | + |
| 90 | + Then table osm2pgsql_properties has 7 rows |
| 91 | + And table osm2pgsql_properties contains |
| 92 | + | property | value | |
| 93 | + | attributes | false | |
| 94 | + | flat_node_file | | |
| 95 | + | prefix | planet_osm | |
| 96 | + | updatable | true | |
| 97 | + | import_timestamp | 2020-01-02T03:04:06Z | |
| 98 | + | current_timestamp | 2020-01-02T03:04:06Z | |
| 99 | + |
| 100 | + Given the OSM data |
| 101 | + """ |
| 102 | + n11 v2 x10 y12 |
| 103 | + w20 v2 Thighway=secondary Nn10,n11 |
| 104 | + """ |
| 105 | + |
| 106 | + When running osm2pgsql pgsql with parameters |
| 107 | + | --append | --slim | |
| 108 | + |
| 109 | + Then table osm2pgsql_properties has 7 rows |
| 110 | + And table osm2pgsql_properties contains |
| 111 | + | property | value | |
| 112 | + | attributes | false | |
| 113 | + | flat_node_file | | |
| 114 | + | prefix | planet_osm | |
| 115 | + | updatable | true | |
| 116 | + | import_timestamp | 2020-01-02T03:04:06Z | |
| 117 | + | current_timestamp | 2020-01-02T03:04:06Z | |
| 118 | + |
| 119 | + Scenario: Create database without timestamps and update with timestamps |
| 120 | + Given the OSM data |
| 121 | + """ |
| 122 | + n10 v1 x10 y10 |
| 123 | + n11 v1 x10 y11 |
| 124 | + w20 v1 Thighway=primary Nn10,n11 |
| 125 | + """ |
| 126 | + |
| 127 | + When running osm2pgsql pgsql with parameters |
| 128 | + | --create | --slim | |
| 129 | + |
| 130 | + Then table osm2pgsql_properties has 5 rows |
| 131 | + And table osm2pgsql_properties contains |
| 132 | + | property | value | |
| 133 | + | attributes | false | |
| 134 | + | flat_node_file | | |
| 135 | + | prefix | planet_osm | |
| 136 | + | updatable | true | |
| 137 | + |
| 138 | + Given the OSM data |
| 139 | + """ |
| 140 | + n11 v2 t2020-01-02T03:06:05Z x10 y12 |
| 141 | + w20 v2 t2020-01-02T03:05:06Z Thighway=secondary Nn10,n11 |
| 142 | + """ |
| 143 | + |
| 144 | + When running osm2pgsql pgsql with parameters |
| 145 | + | --append | --slim | |
| 146 | + |
| 147 | + Then table osm2pgsql_properties has 6 rows |
| 148 | + And table osm2pgsql_properties contains |
| 149 | + | property | value | |
| 150 | + | attributes | false | |
| 151 | + | flat_node_file | | |
| 152 | + | prefix | planet_osm | |
| 153 | + | updatable | true | |
| 154 | + | current_timestamp | 2020-01-02T03:06:05Z | |
| 155 | + |
0 commit comments