mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-09-02 16:37:21 +02:00
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.
This commit is contained in:
parent
7156a0eac3
commit
d7ae549e31
@ -95,6 +95,7 @@ my $pgpassfile = "${TestLib::tmp_check}/pgpass";
|
|||||||
delete $ENV{"PGPASSWORD"};
|
delete $ENV{"PGPASSWORD"};
|
||||||
$ENV{"PGPASSFILE"} = $pgpassfile;
|
$ENV{"PGPASSFILE"} = $pgpassfile;
|
||||||
|
|
||||||
|
unlink($pgpassfile);
|
||||||
append_to_file($pgpassfile, qq!
|
append_to_file($pgpassfile, qq!
|
||||||
# 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.
|
# 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.
|
||||||
*:*:postgres:scram_role:pass:this is not part of the password.
|
*:*:postgres:scram_role:pass:this is not part of the password.
|
||||||
|
Loading…
Reference in New Issue
Block a user