diff --git a/test/CDB_FederatedServerListRemote.sql b/test/CDB_FederatedServerListRemote.sql index 9db8a80..b5372f4 100644 --- a/test/CDB_FederatedServerListRemote.sql +++ b/test/CDB_FederatedServerListRemote.sql @@ -270,6 +270,27 @@ SELECT * FROM cartodb.CDB_Federated_Server_List_Remote_Columns(server => 'loopba -- Rerun should be ok SELECT * FROM cartodb.CDB_Federated_Server_List_Remote_Columns(server => 'loopback', remote_schema => 'S 1', remote_table => 'T 5'); + +-- =================================================================== +-- Test invalid password +-- =================================================================== + +\echo '## Check error message with invalid password (rainy day)' +SELECT cartodb.CDB_Federated_Server_Register_PG(server := 'loopback_invalid'::text, config := '{ + "server": { + "host": "localhost", + "port": @@PGPORT@@ + }, + "credentials": { + "username": "cdb_fs_tester", + "password": "wrong password" + } +}'::jsonb); + +SELECT * FROM cartodb.CDB_Federated_Server_List_Remote_Schemas(server => 'loopback_invalid'); + +SELECT cartodb.CDB_Federated_Server_Unregister(server := 'loopback_invalid'::text); + -- =================================================================== -- Cleanup 2 -- =================================================================== diff --git a/test/CDB_FederatedServerListRemote_expect b/test/CDB_FederatedServerListRemote_expect index e4929a7..70b63b3 100644 --- a/test/CDB_FederatedServerListRemote_expect +++ b/test/CDB_FederatedServerListRemote_expect @@ -149,5 +149,9 @@ geo_nosrid|GEOMETRY,0 geog|Geometry,0 geom|GEOMETRY,4326 geom_wm|GEOMETRY,3857 +## Check error message with invalid password (rainy day) + +ERROR: could not connect to server "cdb_fs_loopback_invalid" + D1| D2|