mirror of https://github.com/citusdata/citus.git
Add test cases for non-superusers
parent
cd63872055
commit
2a61e7336a
|
@ -180,6 +180,19 @@ SELECT * from citus_nodes where active = 'f';
|
|||
localhost | 57638 | worker | f
|
||||
(1 row)
|
||||
|
||||
-- make sure non-superusers can access the view
|
||||
CREATE ROLE normaluser;
|
||||
SET ROLE normaluser;
|
||||
SELECT * FROM citus_nodes;
|
||||
nodename | nodeport | role | active
|
||||
---------------------------------------------------------------------
|
||||
localhost | 57636 | coordinator | t
|
||||
localhost | 57638 | worker | f
|
||||
localhost | 57637 | worker | t
|
||||
(3 rows)
|
||||
|
||||
SET ROLE postgres;
|
||||
DROP ROLE normaluser;
|
||||
-- add some shard placements to the cluster
|
||||
SET citus.shard_count TO 16;
|
||||
SET citus.shard_replication_factor TO 1;
|
||||
|
|
|
@ -72,6 +72,14 @@ SELECT * from citus_nodes where active = 't';
|
|||
-- get get inactive nodes
|
||||
SELECT * from citus_nodes where active = 'f';
|
||||
|
||||
-- make sure non-superusers can access the view
|
||||
CREATE ROLE normaluser;
|
||||
SET ROLE normaluser;
|
||||
SELECT * FROM citus_nodes;
|
||||
|
||||
SET ROLE postgres;
|
||||
DROP ROLE normaluser;
|
||||
|
||||
-- add some shard placements to the cluster
|
||||
SET citus.shard_count TO 16;
|
||||
SET citus.shard_replication_factor TO 1;
|
||||
|
|
Loading…
Reference in New Issue