Ignore more environment variables in TAP tests
authorMichael Paquier <michael@paquier.xyz>
Thu, 3 Jun 2021 02:50:56 +0000 (11:50 +0900)
committerMichael Paquier <michael@paquier.xyz>
Thu, 3 Jun 2021 02:50:56 +0000 (11:50 +0900)
commit8279f68a1b13d58a0c9869a60081009d8995e4df
tree67f68446bdc072dc7dafc4410da5e8b736c9d523
parent2955c2be79b35fa369c83fa3b5f44661cb88afa9
Ignore more environment variables in TAP tests

Various environment variables were not getting reset in the TAP tests,
which would cause failures depending on the tests or the environment
variables involved.  For example, PGSSL{MAX,MIN}PROTOCOLVERSION could
cause failures in the SSL tests.  Even worse, a junk value of
PGCLIENTENCODING makes a server startup fail.  The list of variables
reset is adjusted in each stable branch depending on what is supported.

While on it, simplify a bit the code per a suggestion from Andrew
Dunstan, using a list of variables instead of doing single deletions.

Reviewed-by: Andrew Dunstan, Daniel Gustafsson
Discussion: https://postgr.es/m/YLbjjRpucIeZ78VQ@paquier.xyz
Backpatch-through: 9.6
src/test/perl/TestLib.pm