Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit93fcb4a

Browse files
committed
Clean up roles from roleattributes test
Having the roles remain after the test ends up causing repeated 'makeinstallcheck' runs to fail and may be risky from a security perspectivealso, so remove them at the end of the test.
1 parentd6968e6 commit93fcb4a

File tree

2 files changed

+32
-7
lines changed

2 files changed

+32
-7
lines changed

‎src/test/regress/expected/roleattributes.out

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,20 @@ SELECT * FROM pg_authid WHERE rolname = 'test_bypassrls';
230230
test_bypassrls | f | t | f | f | f | f | t | -1 | |
231231
(1 row)
232232

233-
-- remove the one role with LOGIN rights
233+
-- clean up roles
234+
DROP ROLE test_def_superuser;
235+
DROP ROLE test_superuser;
236+
DROP ROLE test_def_inherit;
237+
DROP ROLE test_inherit;
238+
DROP ROLE test_def_createrole;
239+
DROP ROLE test_createrole;
240+
DROP ROLE test_def_createdb;
241+
DROP ROLE test_createdb;
242+
DROP ROLE test_def_role_canlogin;
234243
DROP ROLE test_role_canlogin;
235-
-- other roles not removed to test pg_dumpall role dump through
236-
-- pg_upgrade
244+
DROP USER test_def_user_canlogin;
245+
DROP USER test_user_canlogin;
246+
DROP ROLE test_def_replication;
247+
DROP ROLE test_replication;
248+
DROP ROLE test_def_bypassrls;
249+
DROP ROLE test_bypassrls;

‎src/test/regress/sql/roleattributes.sql

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,20 @@ SELECT * FROM pg_authid WHERE rolname = 'test_bypassrls';
7878
ALTER ROLE test_bypassrls WITH BYPASSRLS;
7979
SELECT*FROM pg_authidWHERE rolname='test_bypassrls';
8080

81-
-- remove the one role with LOGIN rights
81+
-- clean up roles
82+
DROP ROLE test_def_superuser;
83+
DROP ROLE test_superuser;
84+
DROP ROLE test_def_inherit;
85+
DROP ROLE test_inherit;
86+
DROP ROLE test_def_createrole;
87+
DROP ROLE test_createrole;
88+
DROP ROLE test_def_createdb;
89+
DROP ROLE test_createdb;
90+
DROP ROLE test_def_role_canlogin;
8291
DROP ROLE test_role_canlogin;
83-
84-
-- other roles not removed to test pg_dumpall role dump through
85-
-- pg_upgrade
92+
DROPUSER test_def_user_canlogin;
93+
DROPUSER test_user_canlogin;
94+
DROP ROLE test_def_replication;
95+
DROP ROLE test_replication;
96+
DROP ROLE test_def_bypassrls;
97+
DROP ROLE test_bypassrls;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp