Fixed m04r tests
This commit is contained in:
parent
eca4b42a73
commit
30e480e545
@ -6,7 +6,7 @@ DELETE FROM available_services;
|
||||
DELETE FROM admin0_synonyms;
|
||||
-- Check that the public function is callable, even with no data
|
||||
-- It should return NULL
|
||||
SELECT cdb_dataservices_server.cdb_geocode_postalcode_point('test_user', 'test_org', '03204');
|
||||
SELECT cdb_dataservices_server.cdb_geocode_postalcode_point('test_user', 'test_org', 'test_app', '03204');
|
||||
cdb_geocode_postalcode_point
|
||||
------------------------------
|
||||
|
||||
@ -42,25 +42,25 @@ INSERT INTO admin0_synonyms (adm0_a3, name, name_, rank) VALUES (
|
||||
3
|
||||
);
|
||||
-- This should return the polygon inserted above
|
||||
SELECT cdb_dataservices_server.cdb_geocode_postalcode_point('test_user', 'test_org', '03204');
|
||||
SELECT cdb_dataservices_server.cdb_geocode_postalcode_point('test_user', 'test_org', 'test_app', '03204');
|
||||
cdb_geocode_postalcode_point
|
||||
----------------------------------------------------
|
||||
0101000020E61000000000000000E040408036B47414764840
|
||||
(1 row)
|
||||
|
||||
SELECT cdb_dataservices_server.cdb_geocode_postalcode_point('test_user', 'test_org', '03204', 'spain');
|
||||
SELECT cdb_dataservices_server.cdb_geocode_postalcode_point('test_user', 'test_org', 'test_app', '03204', 'spain');
|
||||
cdb_geocode_postalcode_point
|
||||
----------------------------------------------------
|
||||
0101000020E61000000000000000E040408036B47414764840
|
||||
(1 row)
|
||||
|
||||
SELECT cdb_dataservices_server.cdb_geocode_postalcode_polygon('test_user', 'test_org', '03204');
|
||||
SELECT cdb_dataservices_server.cdb_geocode_postalcode_polygon('test_user', 'test_org', 'test_app', '03204');
|
||||
cdb_geocode_postalcode_polygon
|
||||
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
0106000020E610000001000000010300000001000000040000000000000000E000C01F383D7839B740400000000000E000C0AA3C0EDE220F3B4000000000004812404FB7FCCD04893D400000000000E000C01F383D7839B74040
|
||||
(1 row)
|
||||
|
||||
SELECT cdb_dataservices_server.cdb_geocode_postalcode_polygon('test_user', 'test_org', '03204', 'spain');
|
||||
SELECT cdb_dataservices_server.cdb_geocode_postalcode_polygon('test_user', 'test_org', 'test_app', '03204', 'spain');
|
||||
cdb_geocode_postalcode_polygon
|
||||
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
0106000020E610000001000000010300000001000000040000000000000000E000C01F383D7839B740400000000000E000C0AA3C0EDE220F3B4000000000004812404FB7FCCD04893D400000000000E000C01F383D7839B74040
|
||||
@ -78,7 +78,7 @@ SELECT exists(SELECT *
|
||||
INNER JOIN pg_namespace ns ON (p.pronamespace = ns.oid)
|
||||
WHERE ns.nspname = 'cdb_dataservices_server'
|
||||
AND proname = 'cdb_geocode_postalcode_point'
|
||||
AND oidvectortypes(p.proargtypes) = 'text, text, text');
|
||||
AND oidvectortypes(p.proargtypes) = 'text, text, text, text');
|
||||
exists
|
||||
--------
|
||||
t
|
||||
@ -89,18 +89,7 @@ SELECT exists(SELECT *
|
||||
INNER JOIN pg_namespace ns ON (p.pronamespace = ns.oid)
|
||||
WHERE ns.nspname = 'cdb_dataservices_server'
|
||||
AND proname = 'cdb_geocode_postalcode_point'
|
||||
AND oidvectortypes(p.proargtypes) = 'text, text, text, text');
|
||||
exists
|
||||
--------
|
||||
t
|
||||
(1 row)
|
||||
|
||||
SELECT exists(SELECT *
|
||||
FROM pg_proc p
|
||||
INNER JOIN pg_namespace ns ON (p.pronamespace = ns.oid)
|
||||
WHERE ns.nspname = 'cdb_dataservices_server'
|
||||
AND proname = 'cdb_geocode_postalcode_polygon'
|
||||
AND oidvectortypes(p.proargtypes) = 'text, text, text');
|
||||
AND oidvectortypes(p.proargtypes) = 'text, text, text, text, text');
|
||||
exists
|
||||
--------
|
||||
t
|
||||
@ -117,6 +106,17 @@ SELECT exists(SELECT *
|
||||
t
|
||||
(1 row)
|
||||
|
||||
SELECT exists(SELECT *
|
||||
FROM pg_proc p
|
||||
INNER JOIN pg_namespace ns ON (p.pronamespace = ns.oid)
|
||||
WHERE ns.nspname = 'cdb_dataservices_server'
|
||||
AND proname = 'cdb_geocode_postalcode_polygon'
|
||||
AND oidvectortypes(p.proargtypes) = 'text, text, text, text, text');
|
||||
exists
|
||||
--------
|
||||
t
|
||||
(1 row)
|
||||
|
||||
SELECT exists(SELECT *
|
||||
FROM pg_proc p
|
||||
INNER JOIN pg_namespace ns ON (p.pronamespace = ns.oid)
|
||||
|
@ -1,6 +1,6 @@
|
||||
-- Check that the public function is callable, even with no data
|
||||
-- It should return NULL
|
||||
SELECT cdb_dataservices_server.cdb_geocode_ipaddress_point('test_user', 'test_orgname', '0.0.0.0');
|
||||
SELECT cdb_dataservices_server.cdb_geocode_ipaddress_point('test_user', 'test_orgname', 'test_appname', '0.0.0.0');
|
||||
cdb_geocode_ipaddress_point
|
||||
-----------------------------
|
||||
|
||||
@ -9,7 +9,7 @@ SELECT cdb_dataservices_server.cdb_geocode_ipaddress_point('test_user', 'test_or
|
||||
-- Insert dummy data into ip_address_locations
|
||||
INSERT INTO ip_address_locations VALUES ('::ffff:0.0.0.0'::inet, (ST_SetSRID(ST_MakePoint('40.40', '3.71'), 4326)));
|
||||
-- This should return the polygon inserted above
|
||||
SELECT cdb_dataservices_server.cdb_geocode_ipaddress_point('test_user', 'test_orgname', '0.0.0.0');
|
||||
SELECT cdb_dataservices_server.cdb_geocode_ipaddress_point('test_user', 'test_orgname', 'test_appname', '0.0.0.0');
|
||||
cdb_geocode_ipaddress_point
|
||||
----------------------------------------------------
|
||||
0101000020E61000003333333333334440AE47E17A14AE0D40
|
||||
@ -21,7 +21,7 @@ SELECT exists(SELECT *
|
||||
INNER JOIN pg_namespace ns ON (p.pronamespace = ns.oid)
|
||||
WHERE ns.nspname = 'cdb_dataservices_server'
|
||||
AND proname = 'cdb_geocode_ipaddress_point'
|
||||
AND oidvectortypes(p.proargtypes) = 'text, text, text');
|
||||
AND oidvectortypes(p.proargtypes) = 'text, text, text, text');
|
||||
exists
|
||||
--------
|
||||
t
|
||||
|
@ -4,7 +4,7 @@ SELECT exists(SELECT *
|
||||
INNER JOIN pg_namespace ns ON (p.pronamespace = ns.oid)
|
||||
WHERE ns.nspname = 'cdb_dataservices_server'
|
||||
AND proname = 'cdb_isodistance'
|
||||
AND oidvectortypes(p.proargtypes) = 'text, text, geometry, text, integer[], text[]');
|
||||
AND oidvectortypes(p.proargtypes) = 'text, text, text, geometry, text, integer[], text[]');
|
||||
exists
|
||||
--------
|
||||
t
|
||||
|
@ -4,7 +4,7 @@ SELECT exists(SELECT *
|
||||
INNER JOIN pg_namespace ns ON (p.pronamespace = ns.oid)
|
||||
WHERE ns.nspname = 'cdb_dataservices_server'
|
||||
AND proname = 'cdb_isochrone'
|
||||
AND oidvectortypes(p.proargtypes) = 'text, text, geometry, text, integer[], text[]');
|
||||
AND oidvectortypes(p.proargtypes) = 'text, text, text, geometry, text, integer[], text[]');
|
||||
exists
|
||||
--------
|
||||
t
|
||||
|
@ -4,7 +4,7 @@ SELECT exists(SELECT *
|
||||
INNER JOIN pg_namespace ns ON (p.pronamespace = ns.oid)
|
||||
WHERE ns.nspname = 'cdb_dataservices_server'
|
||||
AND proname = 'cdb_route_point_to_point'
|
||||
AND oidvectortypes(p.proargtypes) = 'text, text, geometry, geometry, text, text[], text');
|
||||
AND oidvectortypes(p.proargtypes) = 'text, text, text, geometry, geometry, text, text[], text');
|
||||
exists
|
||||
--------
|
||||
t
|
||||
@ -16,7 +16,7 @@ SELECT exists(SELECT *
|
||||
INNER JOIN pg_namespace ns ON (p.pronamespace = ns.oid)
|
||||
WHERE ns.nspname = 'cdb_dataservices_server'
|
||||
AND proname = 'cdb_route_with_waypoints'
|
||||
AND oidvectortypes(p.proargtypes) = 'text, text, geometry[], text, text[], text');
|
||||
AND oidvectortypes(p.proargtypes) = 'text, text, text, geometry[], text, text[], text');
|
||||
exists
|
||||
--------
|
||||
t
|
||||
|
@ -7,7 +7,7 @@ DELETE FROM admin0_synonyms;
|
||||
|
||||
-- Check that the public function is callable, even with no data
|
||||
-- It should return NULL
|
||||
SELECT cdb_dataservices_server.cdb_geocode_postalcode_point('test_user', 'test_org', '03204');
|
||||
SELECT cdb_dataservices_server.cdb_geocode_postalcode_point('test_user', 'test_org', 'test_app', '03204');
|
||||
|
||||
-- Insert dummy data into ip_address_locations
|
||||
INSERT INTO global_postal_code_points (the_geom, iso3, postal_code, postal_code_num) VALUES (
|
||||
@ -44,13 +44,13 @@ INSERT INTO admin0_synonyms (adm0_a3, name, name_, rank) VALUES (
|
||||
);
|
||||
|
||||
-- This should return the polygon inserted above
|
||||
SELECT cdb_dataservices_server.cdb_geocode_postalcode_point('test_user', 'test_org', '03204');
|
||||
SELECT cdb_dataservices_server.cdb_geocode_postalcode_point('test_user', 'test_org', 'test_app', '03204');
|
||||
|
||||
SELECT cdb_dataservices_server.cdb_geocode_postalcode_point('test_user', 'test_org', '03204', 'spain');
|
||||
SELECT cdb_dataservices_server.cdb_geocode_postalcode_point('test_user', 'test_org', 'test_app', '03204', 'spain');
|
||||
|
||||
SELECT cdb_dataservices_server.cdb_geocode_postalcode_polygon('test_user', 'test_org', '03204');
|
||||
SELECT cdb_dataservices_server.cdb_geocode_postalcode_polygon('test_user', 'test_org', 'test_app', '03204');
|
||||
|
||||
SELECT cdb_dataservices_server.cdb_geocode_postalcode_polygon('test_user', 'test_org', '03204', 'spain');
|
||||
SELECT cdb_dataservices_server.cdb_geocode_postalcode_polygon('test_user', 'test_org', 'test_app', '03204', 'spain');
|
||||
|
||||
-- Clean dbs
|
||||
DELETE FROM global_postal_code_points;
|
||||
@ -65,21 +65,14 @@ SELECT exists(SELECT *
|
||||
INNER JOIN pg_namespace ns ON (p.pronamespace = ns.oid)
|
||||
WHERE ns.nspname = 'cdb_dataservices_server'
|
||||
AND proname = 'cdb_geocode_postalcode_point'
|
||||
AND oidvectortypes(p.proargtypes) = 'text, text, text');
|
||||
AND oidvectortypes(p.proargtypes) = 'text, text, text, text');
|
||||
|
||||
SELECT exists(SELECT *
|
||||
FROM pg_proc p
|
||||
INNER JOIN pg_namespace ns ON (p.pronamespace = ns.oid)
|
||||
WHERE ns.nspname = 'cdb_dataservices_server'
|
||||
AND proname = 'cdb_geocode_postalcode_point'
|
||||
AND oidvectortypes(p.proargtypes) = 'text, text, text, text');
|
||||
|
||||
SELECT exists(SELECT *
|
||||
FROM pg_proc p
|
||||
INNER JOIN pg_namespace ns ON (p.pronamespace = ns.oid)
|
||||
WHERE ns.nspname = 'cdb_dataservices_server'
|
||||
AND proname = 'cdb_geocode_postalcode_polygon'
|
||||
AND oidvectortypes(p.proargtypes) = 'text, text, text');
|
||||
AND oidvectortypes(p.proargtypes) = 'text, text, text, text, text');
|
||||
|
||||
SELECT exists(SELECT *
|
||||
FROM pg_proc p
|
||||
@ -88,6 +81,13 @@ SELECT exists(SELECT *
|
||||
AND proname = 'cdb_geocode_postalcode_polygon'
|
||||
AND oidvectortypes(p.proargtypes) = 'text, text, text, text');
|
||||
|
||||
SELECT exists(SELECT *
|
||||
FROM pg_proc p
|
||||
INNER JOIN pg_namespace ns ON (p.pronamespace = ns.oid)
|
||||
WHERE ns.nspname = 'cdb_dataservices_server'
|
||||
AND proname = 'cdb_geocode_postalcode_polygon'
|
||||
AND oidvectortypes(p.proargtypes) = 'text, text, text, text, text');
|
||||
|
||||
SELECT exists(SELECT *
|
||||
FROM pg_proc p
|
||||
INNER JOIN pg_namespace ns ON (p.pronamespace = ns.oid)
|
||||
|
@ -1,12 +1,12 @@
|
||||
-- Check that the public function is callable, even with no data
|
||||
-- It should return NULL
|
||||
SELECT cdb_dataservices_server.cdb_geocode_ipaddress_point('test_user', 'test_orgname', '0.0.0.0');
|
||||
SELECT cdb_dataservices_server.cdb_geocode_ipaddress_point('test_user', 'test_orgname', 'test_appname', '0.0.0.0');
|
||||
|
||||
-- Insert dummy data into ip_address_locations
|
||||
INSERT INTO ip_address_locations VALUES ('::ffff:0.0.0.0'::inet, (ST_SetSRID(ST_MakePoint('40.40', '3.71'), 4326)));
|
||||
|
||||
-- This should return the polygon inserted above
|
||||
SELECT cdb_dataservices_server.cdb_geocode_ipaddress_point('test_user', 'test_orgname', '0.0.0.0');
|
||||
SELECT cdb_dataservices_server.cdb_geocode_ipaddress_point('test_user', 'test_orgname', 'test_appname', '0.0.0.0');
|
||||
|
||||
-- Check for namedplaces signatures (point and polygon)
|
||||
SELECT exists(SELECT *
|
||||
@ -14,7 +14,7 @@ SELECT exists(SELECT *
|
||||
INNER JOIN pg_namespace ns ON (p.pronamespace = ns.oid)
|
||||
WHERE ns.nspname = 'cdb_dataservices_server'
|
||||
AND proname = 'cdb_geocode_ipaddress_point'
|
||||
AND oidvectortypes(p.proargtypes) = 'text, text, text');
|
||||
AND oidvectortypes(p.proargtypes) = 'text, text, text, text');
|
||||
|
||||
SELECT exists(SELECT *
|
||||
FROM pg_proc p
|
||||
|
@ -4,4 +4,4 @@ SELECT exists(SELECT *
|
||||
INNER JOIN pg_namespace ns ON (p.pronamespace = ns.oid)
|
||||
WHERE ns.nspname = 'cdb_dataservices_server'
|
||||
AND proname = 'cdb_isodistance'
|
||||
AND oidvectortypes(p.proargtypes) = 'text, text, geometry, text, integer[], text[]');
|
||||
AND oidvectortypes(p.proargtypes) = 'text, text, text, geometry, text, integer[], text[]');
|
||||
|
@ -4,4 +4,4 @@ SELECT exists(SELECT *
|
||||
INNER JOIN pg_namespace ns ON (p.pronamespace = ns.oid)
|
||||
WHERE ns.nspname = 'cdb_dataservices_server'
|
||||
AND proname = 'cdb_isochrone'
|
||||
AND oidvectortypes(p.proargtypes) = 'text, text, geometry, text, integer[], text[]');
|
||||
AND oidvectortypes(p.proargtypes) = 'text, text, text, geometry, text, integer[], text[]');
|
||||
|
@ -4,7 +4,7 @@ SELECT exists(SELECT *
|
||||
INNER JOIN pg_namespace ns ON (p.pronamespace = ns.oid)
|
||||
WHERE ns.nspname = 'cdb_dataservices_server'
|
||||
AND proname = 'cdb_route_point_to_point'
|
||||
AND oidvectortypes(p.proargtypes) = 'text, text, geometry, geometry, text, text[], text');
|
||||
AND oidvectortypes(p.proargtypes) = 'text, text, text, geometry, geometry, text, text[], text');
|
||||
|
||||
-- Check for routing waypoint route signatures
|
||||
SELECT exists(SELECT *
|
||||
@ -12,4 +12,4 @@ SELECT exists(SELECT *
|
||||
INNER JOIN pg_namespace ns ON (p.pronamespace = ns.oid)
|
||||
WHERE ns.nspname = 'cdb_dataservices_server'
|
||||
AND proname = 'cdb_route_with_waypoints'
|
||||
AND oidvectortypes(p.proargtypes) = 'text, text, geometry[], text, text[], text');
|
||||
AND oidvectortypes(p.proargtypes) = 'text, text, text, geometry[], text, text[], text');
|
||||
|
Loading…
Reference in New Issue
Block a user