diff --git a/tests/import/500_import-highway.osm b/tests/import/500_import-highway.osm index 8b745512..a3c89157 100644 --- a/tests/import/500_import-highway.osm +++ b/tests/import/500_import-highway.osm @@ -165,4 +165,14 @@ + + + + + + + + + + diff --git a/tests/test-post-import.sql b/tests/test-post-import.sql index b1af312c..373c557a 100644 --- a/tests/test-post-import.sql +++ b/tests/test-post-import.sql @@ -72,19 +72,24 @@ BEGIN -- Test 500 -- Verify that road classifications show up at the right zoom level - SELECT COUNT(*) INTO cnt FROM osm_transportation_merge_linestring_gen_z4 WHERE highway='motorway'; + SELECT COUNT(*) INTO cnt FROM osm_transportation_merge_linestring_gen_z4 WHERE osm_national_network(network); IF cnt < 1 THEN - INSERT INTO omt_test_failures VALUES(500, 'import', 'osm_transportation_linestring z4 motorway count expected >=1, got ' || cnt); + INSERT INTO omt_test_failures VALUES(500, 'import', 'osm_transportation_linestring z4 national network count expected >=1, got ' || cnt); END IF; - SELECT COUNT(*) INTO cnt FROM osm_transportation_merge_linestring_gen_z4 WHERE highway='trunk'; + SELECT COUNT(*) INTO cnt FROM osm_transportation_merge_linestring_gen_z4 WHERE NOT osm_national_network(network); IF cnt <> 0 THEN - INSERT INTO omt_test_failures VALUES(500, 'import', 'osm_transportation_linestring z4 trunk count expected 0, got ' || cnt); + INSERT INTO omt_test_failures VALUES(500, 'import', 'osm_transportation_linestring z4 not national network count expected 0, got ' || cnt); END IF; - SELECT COUNT(*) INTO cnt FROM osm_transportation_merge_linestring_gen_z5 WHERE highway='trunk'; + SELECT COUNT(*) INTO cnt FROM osm_transportation_merge_linestring_gen_z5 WHERE highway='motorway'; IF cnt < 1 THEN - INSERT INTO omt_test_failures VALUES(500, 'import', 'osm_transportation_linestring z5 trunk count expected >=1, got ' || cnt); + INSERT INTO omt_test_failures VALUES(500, 'import', 'osm_transportation_linestring z5 motorway count expected >=1, got ' || cnt); + END IF; + + SELECT COUNT(*) INTO cnt FROM osm_transportation_merge_linestring_gen_z5 WHERE highway='trunk' AND osm_national_network(network); + IF cnt < 1 THEN + INSERT INTO omt_test_failures VALUES(500, 'import', 'osm_transportation_linestring z5 trunk and national network count expected >=1, got ' || cnt); END IF; SELECT COUNT(*) INTO cnt FROM osm_transportation_merge_linestring_gen_z6 WHERE highway='primary'; @@ -161,10 +166,10 @@ BEGIN END IF; -- Duplicate route concurrencies collapsed - SELECT COUNT(*) INTO cnt FROM osm_route_member + SELECT COUNT(*) INTO cnt FROM transportation_route_member_coalesced WHERE network='US:I' AND ref='95'; IF cnt <> 1 THEN - INSERT INTO omt_test_failures VALUES(500, 'import', 'osm_route_member 1 route membership expected, got ' || cnt); + INSERT INTO omt_test_failures VALUES(500, 'import', 'transportation_route_member_coalesced 1 route membership expected, got ' || cnt); END IF; -- Test 600