Skip to content

Commit

Permalink
test: replication attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
soedirgo authored and steve-chavez committed Feb 9, 2024
1 parent 032e59e commit 9975bb5
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
25 changes: 25 additions & 0 deletions test/expected/privileged_role.out
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,31 @@ select rolbypassrls from pg_roles where rolname = 'r';
drop role r;
\echo

-- can manage replication role attribute
create role r replication;
select rolreplication from pg_roles where rolname = 'r';
rolreplication
----------------
t
(1 row)

alter role r noreplication;
select rolreplication from pg_roles where rolname = 'r';
rolreplication
----------------
f
(1 row)

alter role r replication;
select rolreplication from pg_roles where rolname = 'r';
rolreplication
----------------
t
(1 row)

drop role r;
\echo

-- can manage foreign data wrappers
create extension postgres_fdw;
create foreign data wrapper new_fdw
Expand Down
11 changes: 11 additions & 0 deletions test/sql/privileged_role.sql
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,17 @@ select rolbypassrls from pg_roles where rolname = 'r';
drop role r;
\echo

-- can manage replication role attribute
create role r replication;
select rolreplication from pg_roles where rolname = 'r';
alter role r noreplication;
select rolreplication from pg_roles where rolname = 'r';
alter role r replication;
select rolreplication from pg_roles where rolname = 'r';

drop role r;
\echo

-- can manage foreign data wrappers
create extension postgres_fdw;
create foreign data wrapper new_fdw
Expand Down

0 comments on commit 9975bb5

Please sign in to comment.