1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131
|
Feature: Updates to the test database with properties check
Background:
Given the input file 'liechtenstein-2013-08-03.osm.pbf'
Scenario Outline: Create/append with various parameters
When running osm2pgsql pgsql with parameters
| -c |
| <param_create> |
Given the input file '000466354.osc.gz'
Then running osm2pgsql pgsql with parameters fails
| -a |
| --slim |
| <param_append> |
And the error output contains
"""
<message>
"""
Examples:
| param_create | param_append | message |
| | | This database is not updatable |
| --slim | -x | because original import was without attributes |
| --slim | --prefix=foo | Different prefix specified |
| --slim | --flat-nodes=x | Database was imported without flat node file |
Scenario: Append without output on null output
When running osm2pgsql null with parameters
| -c |
| --slim |
Given the input file '000466354.osc.gz'
When running osm2pgsql nooutput with parameters
| -a |
| --slim |
Then the error output contains
"""
Using output 'null' (same as on import).
"""
Scenario Outline: Create/append with various parameters
When running osm2pgsql pgsql with parameters
| --slim |
| <param_create> |
Given the input file '000466354.osc.gz'
When running osm2pgsql pgsql with parameters
| -a |
| --slim |
| <param_append> |
Then the error output contains
"""
<message>
"""
Examples:
| param_create | param_append | message |
| -x | | Updating with attributes (same as on import). |
| | | Not using flat node file (same as on import). |
| --flat-nodes=x | | Using flat node file |
| --flat-nodes=x | --flat-nodes=x | Using flat node file |
| --prefix=abc | | Using prefix 'abc' (same as on import). |
Scenario: Create, then append with non-existent flat node file
When running osm2pgsql pgsql with parameters
| --slim |
| --flat-nodes=x |
Given the input file '000466354.osc.gz'
Then running osm2pgsql pgsql with parameters fails
| -a |
| --slim |
| --flat-nodes=y |
And the error output contains
"""
Unable to open flatnode file
"""
Scenario: Create with different output than append
When running osm2pgsql pgsql with parameters
| --slim |
Given the input file '000466354.osc.gz'
Then running osm2pgsql null with parameters fails
| -a |
| --slim |
And the error output contains
"""
Different output specified on command line
"""
Scenario: Create/append with with null output doesn't need style
When running osm2pgsql null with parameters
| --slim |
Given the input file '000466354.osc.gz'
When running osm2pgsql null with parameters
| -a |
| --slim |
Then the error output contains
"""
Using style file '' (same as on import).
"""
Scenario Outline: Create/append with various style parameters with flex output
When running osm2pgsql flex with parameters
| --slim |
| <param_create> |
Given the input file '000466354.osc.gz'
When running osm2pgsql flex with parameters
| -a |
| --slim |
| <param_append> |
Then the error output contains
"""
<message>
"""
Examples:
| param_create | param_append | message |
| --style={TEST_DATA_DIR}/test_output_flex.lua | | Using style file |
| --style={TEST_DATA_DIR}/test_output_flex.lua | --style={TEST_DATA_DIR}/test_output_flex.lua | Using style file |
| --style={TEST_DATA_DIR}/test_output_flex.lua | --style={TEST_DATA_DIR}/test_output_flex_copy.lua | Using the style file you specified |
|