postgres.git / summary / log / commit / refs

commit    8df601bd4067ecdf373ebe43bdf03159a12e2e9d
Author:   Tom Lane <tgl@sss.pgh.pa.us>
Date:     Sat Sep 05 01:01:59 2020 +0000
First released in: 14.0, 10.15, 11.10, 12.5, 13.0

    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.


src/test/authentication/t/001_password.pl | 1 + 1 file changed, 1 insertion(+) diff --git a/src/test/authentication/t/001_password.pl b/src/test/authentication/t/001_password.pl index 909003560b6..80b4b965c49 100644 --- a/src/test/authentication/t/001_password.pl +++ b/src/test/authentication/t/001_password.pl @@ -106,6 +106,7 @@ delete $ENV{"PGPASSWORD"}; delete $ENV{"PGCHANNELBINDING"}; $ENV{"PGPASSFILE"} = $pgpassfile; +unlink($pgpassfile); 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. *:*:postgres:scram_role:pass:this is not part of the password. [parent: 9b81a30f924c]