CDB_FederatedServerListRemote: Add rainy tests

This commit is contained in:
Raul Marin 2019-11-04 15:32:34 +01:00
parent c740cfa499
commit 57f420ab4c
2 changed files with 25 additions and 0 deletions

View File

@ -85,12 +85,28 @@ SET client_min_messages TO notice;
\echo 'Test listing of remote schemas (sunny day)'
SELECT * FROM cartodb.CDB_Federated_Server_List_Remote_Schemas(server => 'loopback');
\echo 'Test listing of remote schemas (rainy day): Server does not exist'
SELECT * FROM cartodb.CDB_Federated_Server_List_Remote_Schemas(server => 'Does Not Exist');
\echo 'Test listing of remote tables (sunny day)'
SELECT * FROM cartodb.CDB_Federated_Server_List_Remote_Tables(server => 'loopback', remote_schema => 'S 1');
\echo 'Test listing of remote tables (rainy day): Server does not exist'
SELECT * FROM cartodb.CDB_Federated_Server_List_Remote_Tables(server => 'Does Not Exist', remote_schema => 'S 1');
\echo 'Test listing of remote tables (rainy day): Remote schema does not exist'
SELECT * FROM cartodb.CDB_Federated_Server_List_Remote_Tables(server => 'loopback', remote_schema => 'Does Not Exist');
\echo 'Test listing of remote columns (sunny day)'
SELECT * FROM cartodb.CDB_Federated_Server_List_Remote_Columns(server => 'loopback', remote_schema => 'S 1', remote_table => 'T 1');
\echo 'Test listing of remote columns (rainy day): Server does not exist'
SELECT * FROM cartodb.CDB_Federated_Server_List_Remote_Columns(server => 'Does Not Exist', remote_schema => 'S 1', remote_table => 'T 1');
\echo 'Test listing of remote columns (rainy day): Remote schema does not exist'
SELECT * FROM cartodb.CDB_Federated_Server_List_Remote_Columns(server => 'loopback', remote_schema => 'Does Not Exist', remote_table => 'T 1');
\echo 'Test listing of remote columns (rainy day): Remote table does not exist'
SELECT * FROM cartodb.CDB_Federated_Server_List_Remote_Columns(server => 'loopback', remote_schema => 'S 1', remote_table => 'Does Not Exist');
-- ===================================================================
-- Cleanup 1
-- ===================================================================

View File

@ -4,11 +4,16 @@ Test listing of remote schemas (sunny day)
S 1
information_schema
public
Test listing of remote schemas (rainy day): Server does not exist
ERROR: Server "Does Not Exist" does not exist
Test listing of remote tables (sunny day)
T 1
T 2
T 3
T 4
Test listing of remote tables (rainy day): Server does not exist
ERROR: Server "Does Not Exist" does not exist
Test listing of remote tables (rainy day): Remote schema does not exist
Test listing of remote columns (sunny day)
NOTICE: Could not find Postgis installation in the remote "public" schema
C 1|integer
@ -19,6 +24,10 @@ c5|timestamp without time zone
c6|character varying
c7|character
c8|USER-DEFINED
Test listing of remote columns (rainy day): Server does not exist
ERROR: Server "Does Not Exist" does not exist
Test listing of remote columns (rainy day): Remote schema does not exist
Test listing of remote columns (rainy day): Remote table does not exist
Test listing of remote geometry columns (sunny day)
geo_nosrid|GEOMETRY,0
geog|Geometry,0