From 2cb34406d1581ba623fcab2188d624686865a275 Mon Sep 17 00:00:00 2001 From: Jason Petersen Date: Wed, 22 Mar 2017 17:07:05 -0600 Subject: [PATCH] Minor permissions test fix When running under Enterprise, some of the GRANT commands and whatnot are propagated. Guarding that section with a call to disable DDL prop. fixes everything. --- src/test/regress/expected/multi_multiuser.out | 3 +++ src/test/regress/sql/multi_multiuser.sql | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/src/test/regress/expected/multi_multiuser.out b/src/test/regress/expected/multi_multiuser.out index 3a4c9c0a5..860d8b41a 100644 --- a/src/test/regress/expected/multi_multiuser.out +++ b/src/test/regress/expected/multi_multiuser.out @@ -14,6 +14,8 @@ SELECT create_distributed_table('test', 'id'); (1 row) +-- turn off propagation to avoid Enterprise processing the following section +SET citus.enable_ddl_propagation TO off; CREATE USER full_access; NOTICE: not propagating CREATE ROLE/USER commands to worker nodes HINT: Connect to worker nodes directly to manually create all necessary users and roles. @@ -25,6 +27,7 @@ NOTICE: not propagating CREATE ROLE/USER commands to worker nodes HINT: Connect to worker nodes directly to manually create all necessary users and roles. GRANT ALL ON TABLE test TO full_access; GRANT SELECT ON TABLE test TO read_access; +SET citus.enable_ddl_propagation TO DEFAULT; \c - - - :worker_1_port CREATE USER full_access; NOTICE: not propagating CREATE ROLE/USER commands to worker nodes diff --git a/src/test/regress/sql/multi_multiuser.sql b/src/test/regress/sql/multi_multiuser.sql index 486b827b3..2819b408a 100644 --- a/src/test/regress/sql/multi_multiuser.sql +++ b/src/test/regress/sql/multi_multiuser.sql @@ -13,6 +13,9 @@ SET citus.shard_count TO 2; CREATE TABLE test (id integer); SELECT create_distributed_table('test', 'id'); +-- turn off propagation to avoid Enterprise processing the following section +SET citus.enable_ddl_propagation TO off; + CREATE USER full_access; CREATE USER read_access; CREATE USER no_access; @@ -20,6 +23,8 @@ CREATE USER no_access; GRANT ALL ON TABLE test TO full_access; GRANT SELECT ON TABLE test TO read_access; +SET citus.enable_ddl_propagation TO DEFAULT; + \c - - - :worker_1_port CREATE USER full_access; CREATE USER read_access;