diff options
author | Stephen Frost <sfrost@snowman.net> | 2015-08-21 15:51:29 -0400 |
---|---|---|
committer | Stephen Frost <sfrost@snowman.net> | 2015-08-21 15:51:29 -0400 |
commit | 93fcb4ae3e4b20e8562f0a8cab3a3a486ad84e76 (patch) | |
tree | 7475d50e5337ebb4c7b93924c3e4edfc7a90d114 | |
parent | d6968e625770d021c8db15094ea732b40be2c5aa (diff) | |
download | postgresql-93fcb4ae3e4b20e8562f0a8cab3a3a486ad84e76.tar.gz postgresql-93fcb4ae3e4b20e8562f0a8cab3a3a486ad84e76.zip |
Clean up roles from roleattributes test
Having the roles remain after the test ends up causing repeated 'make
installcheck' runs to fail and may be risky from a security perspective
also, so remove them at the end of the test.
-rw-r--r-- | src/test/regress/expected/roleattributes.out | 19 | ||||
-rw-r--r-- | src/test/regress/sql/roleattributes.sql | 20 |
2 files changed, 32 insertions, 7 deletions
diff --git a/src/test/regress/expected/roleattributes.out b/src/test/regress/expected/roleattributes.out index b7fded93556..aa5f42abf43 100644 --- a/src/test/regress/expected/roleattributes.out +++ b/src/test/regress/expected/roleattributes.out @@ -230,7 +230,20 @@ SELECT * FROM pg_authid WHERE rolname = 'test_bypassrls'; test_bypassrls | f | t | f | f | f | f | t | -1 | | (1 row) --- remove the one role with LOGIN rights +-- clean up roles +DROP ROLE test_def_superuser; +DROP ROLE test_superuser; +DROP ROLE test_def_inherit; +DROP ROLE test_inherit; +DROP ROLE test_def_createrole; +DROP ROLE test_createrole; +DROP ROLE test_def_createdb; +DROP ROLE test_createdb; +DROP ROLE test_def_role_canlogin; DROP ROLE test_role_canlogin; --- other roles not removed to test pg_dumpall role dump through --- pg_upgrade +DROP USER test_def_user_canlogin; +DROP USER test_user_canlogin; +DROP ROLE test_def_replication; +DROP ROLE test_replication; +DROP ROLE test_def_bypassrls; +DROP ROLE test_bypassrls; diff --git a/src/test/regress/sql/roleattributes.sql b/src/test/regress/sql/roleattributes.sql index 9f9dd9cf812..67c6b0f8351 100644 --- a/src/test/regress/sql/roleattributes.sql +++ b/src/test/regress/sql/roleattributes.sql @@ -78,8 +78,20 @@ SELECT * FROM pg_authid WHERE rolname = 'test_bypassrls'; ALTER ROLE test_bypassrls WITH BYPASSRLS; SELECT * FROM pg_authid WHERE rolname = 'test_bypassrls'; --- remove the one role with LOGIN rights +-- clean up roles +DROP ROLE test_def_superuser; +DROP ROLE test_superuser; +DROP ROLE test_def_inherit; +DROP ROLE test_inherit; +DROP ROLE test_def_createrole; +DROP ROLE test_createrole; +DROP ROLE test_def_createdb; +DROP ROLE test_createdb; +DROP ROLE test_def_role_canlogin; DROP ROLE test_role_canlogin; - --- other roles not removed to test pg_dumpall role dump through --- pg_upgrade +DROP USER test_def_user_canlogin; +DROP USER test_user_canlogin; +DROP ROLE test_def_replication; +DROP ROLE test_replication; +DROP ROLE test_def_bypassrls; +DROP ROLE test_bypassrls; |