Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 8df601b

Browse files
committed
Make new authentication test case more robust.
I happened to notice that the new test case I added in b55b4dad9 falls over if one runs "make check" repeatedly; though not in branches after v10. That's because it was assuming that tmp_check/pgpass wouldn't exist already. However, it's only been since v11 that the Makefiles forcibly remove all of tmp_check/ before starting a TAP run. This fix to unlink the file is therefore strictly necessary only in v10 ... but it seems wisest to do it across the board, rather than let the test rely on external logic to get the conditions right.
1 parent 9b81a30 commit 8df601b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/test/authentication/t/001_password.pl

+1
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ sub test_role
106106
delete $ENV{"PGCHANNELBINDING"};
107107
$ENV{"PGPASSFILE"} = $pgpassfile;
108108

109+
unlink($pgpassfile);
109110
append_to_file($pgpassfile, qq!
110111
# This very long comment is just here to exercise handling of long lines in the file. This very long comment is just here to exercise handling of long lines in the file. This very long comment is just here to exercise handling of long lines in the file. This very long comment is just here to exercise handling of long lines in the file. This very long comment is just here to exercise handling of long lines in the file.
111112
*:*:postgres:scram_role:pass:this is not part of the password.

0 commit comments

Comments
 (0)