Skip to content

Commit

Permalink
Get the hostname of the server from env instead of hardcoding localhost
Browse files Browse the repository at this point in the history
fixes regresschecklocal for remote server
  • Loading branch information
JLockerman authored and RobAtticus committed Dec 4, 2018
1 parent 37d574d commit 01a11db
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ set(PG_REGRESS_OPTS_LOCAL_INSTANCE

set(PG_REGRESS_ENV
TEST_PGUSER=${TEST_PGUSER}

TEST_PGHOST=${TEST_PGHOST}
TEST_ROLE_SUPERUSER=${TEST_ROLE_SUPERUSER}
TEST_ROLE_DEFAULT_PERM_USER=${TEST_ROLE_DEFAULT_PERM_USER}
TEST_ROLE_DEFAULT_PERM_USER_2=${TEST_ROLE_DEFAULT_PERM_USER_2}
Expand Down
8 changes: 4 additions & 4 deletions test/expected/installation_metadata.out
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,12 @@ SELECT _timescaledb_internal.test_install_timestamp() = :'timestamp_1' as timest

-- Now make sure that only the exported_uuid is exported on pg_dump
\c postgres :ROLE_SUPERUSER
\! pg_dump -h localhost -U super_user -Fc single > dump/single.sql
\! dropdb -h localhost -U super_user single
\! createdb -h localhost -U super_user single
\! pg_dump -h ${TEST_PGHOST} -U super_user -Fc single > dump/single.sql
\! dropdb -h ${TEST_PGHOST} -U super_user single
\! createdb -h ${TEST_PGHOST} -U super_user single
ALTER DATABASE single SET timescaledb.restoring='on';
-- Redirect to /dev/null to suppress NOTICE
\! pg_restore -h localhost -U super_user -d single dump/single.sql > /dev/null 2>&1
\! pg_restore -h ${TEST_PGHOST} -U super_user -d single dump/single.sql > /dev/null 2>&1
ALTER DATABASE single SET timescaledb.restoring='off';
\c single :ROLE_DEFAULT_PERM_USER
-- Should have all 3 row, because pg_dump includes the insertion of uuid and timestamp.
Expand Down
8 changes: 4 additions & 4 deletions test/sql/installation_metadata.sql
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@ SELECT _timescaledb_internal.test_install_timestamp() = :'timestamp_1' as timest
-- Now make sure that only the exported_uuid is exported on pg_dump
\c postgres :ROLE_SUPERUSER

\! pg_dump -h localhost -U super_user -Fc single > dump/single.sql
\! dropdb -h localhost -U super_user single
\! createdb -h localhost -U super_user single
\! pg_dump -h ${TEST_PGHOST} -U super_user -Fc single > dump/single.sql
\! dropdb -h ${TEST_PGHOST} -U super_user single
\! createdb -h ${TEST_PGHOST} -U super_user single
ALTER DATABASE single SET timescaledb.restoring='on';
-- Redirect to /dev/null to suppress NOTICE
\! pg_restore -h localhost -U super_user -d single dump/single.sql > /dev/null 2>&1
\! pg_restore -h ${TEST_PGHOST} -U super_user -d single dump/single.sql > /dev/null 2>&1
ALTER DATABASE single SET timescaledb.restoring='off';

\c single :ROLE_DEFAULT_PERM_USER
Expand Down

0 comments on commit 01a11db

Please sign in to comment.