Federated Server: Test with incorrect password

This commit is contained in:
Raul Marin 2019-11-06 10:20:53 +01:00
parent 29e2ee670f
commit 90b58fcdec
2 changed files with 25 additions and 0 deletions

View File

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

View File

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