Merge pull request #5872 from citusdata/schema-tests-arbitrary

Add schema tests to arbitrary configs
pull/5875/head
Ahmet Gedemenli 2022-04-01 16:17:13 +03:00 committed by GitHub
commit 5374c771a9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 47 additions and 0 deletions

View File

@ -4,6 +4,7 @@ test: dropped_columns_create_load distributed_planning_create_load
test: local_dist_join_load
test: partitioned_indexes_create
test: connectivity_checks
test: schemas_create
test: views_create
test: sequences_create
test: index_create

View File

@ -0,0 +1,15 @@
SELECT nspname FROM pg_namespace WHERE nspname LIKE 'test_schema%' ORDER BY nspname;
nspname
---------------------------------------------------------------------
test_schema_1
test_schema_3_renamed
test_schema_5
(3 rows)
SELECT * FROM test_schema_5.test_table ORDER BY a;
a
---------------------------------------------------------------------
1
2
(2 rows)

View File

@ -0,0 +1,15 @@
CREATE SCHEMA test_schema_1;
CREATE SCHEMA IF NOT EXISTS test_schema_2;
CREATE SCHEMA test_schema_3 CREATE TABLE test_table(a INT PRIMARY KEY);
SELECT create_distributed_table('test_schema_3.test_table','a');
create_distributed_table
---------------------------------------------------------------------
(1 row)
INSERT INTO test_schema_3.test_table VALUES (1), (2);
DROP SCHEMA test_schema_2;
CREATE SCHEMA test_schema_4;
ALTER TABLE test_schema_3.test_table SET SCHEMA test_schema_4;
ALTER SCHEMA test_schema_3 RENAME TO test_schema_3_renamed;
ALTER SCHEMA test_schema_4 RENAME TO test_schema_5;

View File

@ -0,0 +1,2 @@
SELECT nspname FROM pg_namespace WHERE nspname LIKE 'test_schema%' ORDER BY nspname;
SELECT * FROM test_schema_5.test_table ORDER BY a;

View File

@ -0,0 +1,13 @@
CREATE SCHEMA test_schema_1;
CREATE SCHEMA IF NOT EXISTS test_schema_2;
CREATE SCHEMA test_schema_3 CREATE TABLE test_table(a INT PRIMARY KEY);
SELECT create_distributed_table('test_schema_3.test_table','a');
INSERT INTO test_schema_3.test_table VALUES (1), (2);
DROP SCHEMA test_schema_2;
CREATE SCHEMA test_schema_4;
ALTER TABLE test_schema_3.test_table SET SCHEMA test_schema_4;
ALTER SCHEMA test_schema_3 RENAME TO test_schema_3_renamed;
ALTER SCHEMA test_schema_4 RENAME TO test_schema_5;

View File

@ -6,6 +6,7 @@ test: intermediate_result_pruning_queries_1 intermediate_result_pruning_queries_
test: dropped_columns_1 distributed_planning
test: local_dist_join
test: connectivity_checks citus_run_command
test: schemas
test: sequences
test: arbitrary_configs_truncate
test: arbitrary_configs_truncate_cascade