Skip to content

Commit 3c99c51

Browse files
authored
Reset GUCs at the end of regression tests. (#300)
Fixes spurious test failures if the test order is not as expected.
1 parent 8ef55c0 commit 3c99c51

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

test/expected/pg_tle_api.out

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -464,6 +464,15 @@ SELECT pgtle.unregister_feature('password_check_length_greater_than_8', 'clienta
464464
(1 row)
465465

466466
-- now drop everything
467+
ALTER SYSTEM RESET pgtle.enable_password_check;
468+
ALTER SYSTEM RESET pgtle.passcheck_db_name;
469+
SELECT pg_reload_conf();
470+
pg_reload_conf
471+
----------------
472+
t
473+
(1 row)
474+
475+
\c
467476
DROP FUNCTION password_check_length_greater_than_8;
468477
DROP SCHEMA pass CASCADE;
469478
NOTICE: drop cascades to function pass.password_check_length_greater_than_8(text,text,pgtle.password_types,timestamp with time zone,boolean)

test/sql/pg_tle_api.sql

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,10 @@ SELECT pg_reload_conf();
267267
SELECT pgtle.register_feature('password_check_length_greater_than_8', 'clientauth');
268268
SELECT pgtle.unregister_feature('password_check_length_greater_than_8', 'clientauth');
269269
-- now drop everything
270+
ALTER SYSTEM RESET pgtle.enable_password_check;
271+
ALTER SYSTEM RESET pgtle.passcheck_db_name;
272+
SELECT pg_reload_conf();
273+
\c
270274
DROP FUNCTION password_check_length_greater_than_8;
271275
DROP SCHEMA pass CASCADE;
272276
DROP EXTENSION pg_tle;

0 commit comments

Comments
 (0)