Skip to content

Commit 88824e6

Browse files
committed
Avoid context dependency in test case added by 9a71989.
It's not quite clear to me why this didn't show up in my local check-world testing, but some of the buildfarm evidently runs this test with a different database name. Adjust the test so that that doesn't affect the reported error messages.
1 parent 9a71989 commit 88824e6

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

src/test/modules/unsafe_tests/expected/setconfig.out

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,18 +63,18 @@ SET ROLE NONE;
6363
DO $$BEGIN EXECUTE format(
6464
'ALTER DATABASE %I RESET role', current_catalog); END$$;
6565
-- Test some error cases
66+
-- We have to use terse mode so that the database name doesn't
67+
-- appear in the error output.
68+
\set VERBOSITY terse
6669
DO $$BEGIN EXECUTE format(
6770
'ALTER DATABASE %I SET bogus = 0', current_catalog); END$$;
6871
ERROR: unrecognized configuration parameter "bogus"
69-
CONTEXT: SQL statement "ALTER DATABASE contrib_regression SET bogus = 0"
70-
PL/pgSQL function inline_code_block line 1 at EXECUTE
7172
DO $$BEGIN EXECUTE format(
7273
'ALTER DATABASE %I RESET bogus', current_catalog); END$$;
7374
ERROR: unrecognized configuration parameter "bogus"
74-
CONTEXT: SQL statement "ALTER DATABASE contrib_regression RESET bogus"
75-
PL/pgSQL function inline_code_block line 1 at EXECUTE
7675
ALTER USER regress_authenticated_user_db_ssa RESET bogus;
7776
ERROR: unrecognized configuration parameter "bogus"
77+
\set VERBOSITY default
7878
-- Test connection string options
7979
\c -reuse-previous=on "user=regress_authenticated_user_db_sr options=-crole=regress_current_user"
8080
SELECT current_user, session_user;

src/test/modules/unsafe_tests/sql/setconfig.sql

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,16 @@ DO $$BEGIN EXECUTE format(
5151

5252

5353
-- Test some error cases
54+
-- We have to use terse mode so that the database name doesn't
55+
-- appear in the error output.
5456

57+
\set VERBOSITY terse
5558
DO $$BEGIN EXECUTE format(
5659
'ALTER DATABASE %I SET bogus = 0', current_catalog); END$$;
5760
DO $$BEGIN EXECUTE format(
5861
'ALTER DATABASE %I RESET bogus', current_catalog); END$$;
5962
ALTER USER regress_authenticated_user_db_ssa RESET bogus;
63+
\set VERBOSITY default
6064

6165

6266
-- Test connection string options

0 commit comments

Comments
 (0)