Skip to content

Commit d0d9683

Browse files
committed
Don't leave roles behind after core regression tests.
Commits cf5eb37 and e5b8a4c each created a new role that they forgot to remove again. This breaks the use-case of running "make installcheck" more than once, and it's also against project policy because it'd be quite unfriendly behavior if one were running "make installcheck" against a non-throwaway installation.
1 parent c971a5b commit d0d9683

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

src/test/regress/expected/create_role.out

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,18 +174,23 @@ DROP ROLE regress_password_null;
174174
DROP ROLE regress_noiseword;
175175
DROP ROLE regress_inroles;
176176
DROP ROLE regress_adminroles;
177-
-- fail, cannot drop ourself nor superusers
177+
-- fail, cannot drop ourself, nor superusers or roles we lack ADMIN for
178178
DROP ROLE regress_role_super;
179179
ERROR: must be superuser to drop superusers
180180
DROP ROLE regress_role_admin;
181181
ERROR: current user cannot be dropped
182+
DROP ROLE regress_rolecreator;
183+
ERROR: must have admin option on role "regress_rolecreator"
182184
-- ok
183185
RESET SESSION AUTHORIZATION;
184186
REVOKE CREATE ON DATABASE regression FROM regress_role_admin CASCADE;
185187
DROP INDEX tenant_idx;
186188
DROP TABLE tenant_table;
187189
DROP VIEW tenant_view;
190+
DROP SCHEMA regress_tenant2_schema;
188191
DROP ROLE regress_tenant;
192+
DROP ROLE regress_tenant2;
193+
DROP ROLE regress_rolecreator;
189194
DROP ROLE regress_role_admin;
190195
DROP ROLE regress_role_super;
191196
DROP ROLE regress_role_normal;

src/test/regress/sql/create_role.sql

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,17 +161,21 @@ DROP ROLE regress_noiseword;
161161
DROP ROLE regress_inroles;
162162
DROP ROLE regress_adminroles;
163163

164-
-- fail, cannot drop ourself nor superusers
164+
-- fail, cannot drop ourself, nor superusers or roles we lack ADMIN for
165165
DROP ROLE regress_role_super;
166166
DROP ROLE regress_role_admin;
167+
DROP ROLE regress_rolecreator;
167168

168169
-- ok
169170
RESET SESSION AUTHORIZATION;
170171
REVOKE CREATE ON DATABASE regression FROM regress_role_admin CASCADE;
171172
DROP INDEX tenant_idx;
172173
DROP TABLE tenant_table;
173174
DROP VIEW tenant_view;
175+
DROP SCHEMA regress_tenant2_schema;
174176
DROP ROLE regress_tenant;
177+
DROP ROLE regress_tenant2;
178+
DROP ROLE regress_rolecreator;
175179
DROP ROLE regress_role_admin;
176180
DROP ROLE regress_role_super;
177181
DROP ROLE regress_role_normal;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy