From acd101af9befc307b2872bf6fbc0f38a0a6264c5 Mon Sep 17 00:00:00 2001 From: Tyler Parsons Date: Tue, 23 Jan 2018 23:49:54 -0500 Subject: [PATCH] Use PGPORT as fdw port if specified --- test/extension/test.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/test/extension/test.sh b/test/extension/test.sh index 4a1f122..a38bfac 100755 --- a/test/extension/test.sh +++ b/test/extension/test.sh @@ -513,7 +513,12 @@ END DATABASE=fdw_target sql postgres "SELECT cdb_tablemetadatatouch('test_fdw.foo'::regclass);" DATABASE=fdw_target sql postgres "SELECT cdb_tablemetadatatouch('test_fdw.foo2'::regclass);" - sql postgres "SELECT cartodb.CDB_Conf_SetConf('fdws', '{\"test_fdw\": {\"server\": {\"host\": \"localhost\", \"dbname\": \"fdw_target\"}, + # Add PGPORT to conf if it is set + PORT_SPEC="" + if [[ "$PGPORT" != "" ]] ; then + PORT_SPEC=", \"port\": \"$PGPORT\"" + fi + sql postgres "SELECT cartodb.CDB_Conf_SetConf('fdws', '{\"test_fdw\": {\"server\": {\"host\": \"localhost\", \"dbname\": \"fdw_target\" $PORT_SPEC }, \"users\": {\"public\": {\"user\": \"fdw_user\", \"password\": \"foobarino\"}}}}')" sql postgres "SELECT cartodb._CDB_Setup_FDW('test_fdw')"