Skip to content

Commit

Permalink
Modify 'regresscheck-shared' target to run on cloud instance.
Browse files Browse the repository at this point in the history
Set test parameters to default values of currently available cloud instance.
Use existing database, instead of dropping 'tsdb'.
  • Loading branch information
pallavisontakke committed Feb 10, 2023
1 parent 71e1049 commit ec9222e
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 6 deletions.
28 changes: 23 additions & 5 deletions test/test-defs.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,35 @@ set(TEST_CLUSTER ${TEST_OUTPUT_DIR}/testcluster)

# Basic connection info for test instance
set(TEST_PGPORT_LOCAL
5432
33653
CACHE STRING "The port of a running PostgreSQL instance")
set(TEST_PGHOST
localhost
g3c08m6jel.wslct1863h.tsdb.cloud.timescale.com
CACHE STRING "The hostname of a running PostgreSQL instance")
set(TEST_PGUSER
${TEST_ROLE_DEFAULT_PERM_USER}
tsdbadmin
CACHE STRING "The PostgreSQL test user")
set(TEST_DBNAME
single
tsdb
CACHE STRING "The database name to use for tests")
set(TEST_PGPORT_TEMP_INSTANCE
55432
33653
CACHE STRING "The port to run a temporary test PostgreSQL instance on")
#set(TEST_PGPORT_LOCAL
# 5432
# CACHE STRING "The port of a running PostgreSQL instance")
#set(TEST_PGHOST
# localhost
# CACHE STRING "The hostname of a running PostgreSQL instance")
#set(TEST_PGUSER
# macuser
# CACHE STRING "The PostgreSQL test user")
#set(TEST_DBNAME
# postgres
# CACHE STRING "The database name to use for tests")
#set(TEST_PGPORT_TEMP_INSTANCE
# 5432
# CACHE STRING "The port to run a temporary test PostgreSQL instance on")
set(TEST_SCHEDULE ${CMAKE_CURRENT_BINARY_DIR}/test_schedule)
set(TEST_SCHEDULE_SHARED
${CMAKE_CURRENT_BINARY_DIR}/shared/test_schedule_shared)
Expand Down Expand Up @@ -80,6 +95,7 @@ set(PG_REGRESS_OPTS_EXTRA
set(PG_REGRESS_SHARED_OPTS_EXTRA
--create-role=${TEST_ROLE_DEFAULT_PERM_USER},${TEST_ROLE_DEFAULT_PERM_USER_2}
--dbname=${TEST_DBNAME}
--user=${TEST_PGUSER}
--launcher=${PRIMARY_TEST_DIR}/runner_shared.sh)

set(PG_ISOLATION_REGRESS_OPTS_EXTRA
Expand Down Expand Up @@ -108,6 +124,8 @@ set(PG_REGRESS_OPTS_TEMP_INSTANCE_PGTEST

set(PG_REGRESS_OPTS_LOCAL_INSTANCE --port=${TEST_PGPORT_LOCAL})

set(PG_REGRESS_USE_EXISTING_DB --use-existing)

if(PG_REGRESS)
set(PG_REGRESS_ENV
TEST_PGUSER=${TEST_PGUSER}
Expand Down
2 changes: 1 addition & 1 deletion tsl/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ if(PG_REGRESS)
TEST_SCHEDULE=${TEST_SCHEDULE_SHARED}
TEST_PGPORT=${TEST_PGPORT_TEMP_INSTANCE} ${PRIMARY_TEST_DIR}/pg_regress.sh
${PG_REGRESS_OPTS_BASE} ${PG_REGRESS_SHARED_OPTS_EXTRA}
${PG_REGRESS_SHARED_OPTS_INOUT} ${PG_REGRESS_OPTS_TEMP_INSTANCE}
${PG_REGRESS_SHARED_OPTS_INOUT} ${PG_REGRESS_USE_EXISTING_DB}
--temp-config=${TEST_OUTPUT_DIR}/postgresql.conf
USES_TERMINAL)

Expand Down

0 comments on commit ec9222e

Please sign in to comment.