add test for invalid arcgis layer in ogr2ogr 2.1.1

pull/13546/head
Alberto Romeu 7 years ago
parent 9d9d9d4931
commit 17745c37eb

@ -0,0 +1,205 @@
{
"objectIdFieldName": "OBJECTID",
"objectIds": [
2133,
2134,
2137,
2138,
2141,
2142,
2143,
2144,
2145,
2146,
2147,
2148,
2149,
2150,
2151,
2152,
2153,
2154,
2155,
2156,
2157,
2158,
2159,
2160,
2161,
2163,
2164,
2165,
2166,
2167,
2168,
2169,
2170,
2171,
2172,
2173,
2174,
2175,
2176,
2177,
2178,
2179,
2180,
2182,
2183,
2184,
2185,
2186,
2187,
2188,
2189,
2191,
2192,
2194,
2195,
2196,
2197,
2198,
2199,
2200,
2201,
2202,
2203,
2205,
2206,
2207,
2208,
2209,
2210,
2213,
2215,
2217,
2218,
2219,
2220,
2221,
2222,
2223,
2224,
2225,
2226,
2227,
2228,
2230,
2231,
2232,
2233,
2234,
2235,
2236,
2237,
2238,
2239,
2240,
2241,
2242,
2243,
2244,
2245,
2246,
15705,
15706,
15707,
15708,
15709,
15710,
15711,
15712,
15713,
15714,
15715,
15716,
15717,
15718,
15719,
15720,
15721,
15722,
15723,
15724,
15725,
15726,
15727,
15728,
15729,
15730,
15731,
15732,
15733,
15734,
15735,
15736,
15737,
15738,
15739,
15740,
15741,
15742,
15743,
15744,
15745,
15746,
15747,
15748,
15749,
15750,
15751,
15752,
15753,
15754,
15755,
15756,
15757,
15758,
15759,
15760,
15761,
15762,
15763,
15764,
15765,
15766,
15767,
15768,
15769,
15771,
15772,
15773,
15774,
15775,
15776,
15777,
15778,
15779,
15780,
15781,
15782,
15783,
15784,
15785,
15786,
15787,
15788,
15789,
15790,
15791,
15792,
15793,
15794,
15796,
15797,
15798,
15799,
15800,
15801,
15802,
15803,
15804,
15805,
15806
]
}

File diff suppressed because it is too large Load Diff

@ -534,6 +534,37 @@ describe DataImport do
data_import.state.should eq 'failure'
data_import.error_code.should eq 1012
end
it 'should import this supposed invalid dataset for ogr2ogr 2.1.1' do
# IDs list of a layer
Typhoeus.stub(/\/arcgis\/rest\/(.*)query\?where=/) do
body = File.read(File.join(File.dirname(__FILE__), "../fixtures/arcgis_ids_invalid.json"))
Typhoeus::Response.new(
code: 200,
headers: { 'Content-Type' => 'application/json' },
body: body
)
end
Typhoeus.stub(/\/arcgis\/rest\/(.*)query$/) do
body = File.read(File.join(File.dirname(__FILE__), "../fixtures/arcgis_response_invalid.json"))
body = ::JSON.parse(body)
Typhoeus::Response.new(
code: 200,
headers: { 'Content-Type' => 'application/json' },
body: ::JSON.dump(body)
)
end
data_import = DataImport.create(
user_id: @user.id,
service_name: 'arcgis',
service_item_id: 'https://wtf.com/arcgis/rest/services/Planning/EPI_Primary_Planning_Layers/MapServer/2'
)
data_import.run_import!
data_import.state.should eq 'complete'
end
end
describe 'log' do

Loading…
Cancel
Save