mirror of
https://github.com/timescale/timescaledb.git
synced 2025-05-15 01:53:41 +08:00
When CAggs migration was introduced in commit e34218ce the regression tests was splited into 6 (six) different test suites. Simplyfied it grouping tests and reduced to just 2 (two) different test suites. It save resources and time because each suite test spawn it own Postgres instance.
52 lines
1.7 KiB
SQL
52 lines
1.7 KiB
SQL
-- This file and its contents are licensed under the Timescale License.
|
|
-- Please see the included NOTICE for copyright information and
|
|
-- LICENSE-TIMESCALE for a copy of the license.
|
|
|
|
------------------------------------
|
|
-- Set up a distributed environment
|
|
------------------------------------
|
|
\c :TEST_DBNAME :ROLE_CLUSTER_SUPERUSER
|
|
|
|
\set DATA_NODE_1 :TEST_DBNAME _1
|
|
\set DATA_NODE_2 :TEST_DBNAME _2
|
|
\set DATA_NODE_3 :TEST_DBNAME _3
|
|
|
|
\ir include/remote_exec.sql
|
|
|
|
SELECT node_name, database, node_created, database_created, extension_created
|
|
FROM (
|
|
SELECT (add_data_node(name, host => 'localhost', DATABASE => name)).*
|
|
FROM (VALUES (:'DATA_NODE_1'), (:'DATA_NODE_2'), (:'DATA_NODE_3')) v(name)
|
|
) a;
|
|
|
|
GRANT USAGE ON FOREIGN SERVER :DATA_NODE_1, :DATA_NODE_2, :DATA_NODE_3 TO PUBLIC;
|
|
|
|
\set IS_DISTRIBUTED TRUE
|
|
|
|
-- ########################################################
|
|
-- ## INTEGER data type tests
|
|
-- ########################################################
|
|
\set IS_TIME_DIMENSION FALSE
|
|
\set TIME_DIMENSION_DATATYPE INTEGER
|
|
\ir include/cagg_migrate_common.sql
|
|
|
|
-- ########################################################
|
|
-- ## TIMESTAMP data type tests
|
|
-- ########################################################
|
|
\set IS_TIME_DIMENSION TRUE
|
|
\set TIME_DIMENSION_DATATYPE TIMESTAMP
|
|
\ir include/cagg_migrate_common.sql
|
|
|
|
-- ########################################################
|
|
-- ## TIMESTAMPTZ data type tests
|
|
-- ########################################################
|
|
\set IS_TIME_DIMENSION TRUE
|
|
\set TIME_DIMENSION_DATATYPE TIMESTAMPTZ
|
|
\ir include/cagg_migrate_common.sql
|
|
|
|
-- cleanup
|
|
\c :TEST_DBNAME :ROLE_CLUSTER_SUPERUSER;
|
|
DROP DATABASE :DATA_NODE_1;
|
|
DROP DATABASE :DATA_NODE_2;
|
|
DROP DATABASE :DATA_NODE_3;
|