Local Test Fixes (#1505)

This PR fixes local tests affected by the changes introduced in #1440 #1444 #1361 #1501
pull/1506/head
benedikt-brandtner-bikemap 2023-03-21 11:33:50 +01:00 zatwierdzone przez GitHub
rodzic 81d29fff2b
commit f918f4d607
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
2 zmienionych plików z 23 dodań i 8 usunięć

Wyświetl plik

@ -165,4 +165,14 @@
<tag k="ref" v="95"/>
<tag k="description" v="I-95 Southbound"/>
</relation>
<!-- Zoom-Level 5 Trunk National Network -->
<relation id="517" visible="true" timestamp="2019-01-01T00:00:00Z" version="1" changeset="1" user="u" uid="1">
<member type="way" ref="5001" role=""/>
<tag k="type" v="route"/>
<tag k="route" v="road"/>
<tag k="network" v="US:I"/>
<tag k="ref" v="94"/>
<tag k="description" v="I-94"/>
</relation>
</osm>

Wyświetl plik

@ -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