Add test cases for non-superusers

pull/7968/head
Alper Kocatas 2025-05-12 11:08:59 +00:00
parent cd63872055
commit 2a61e7336a
2 changed files with 21 additions and 0 deletions

View File

@ -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;

View File

@ -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;