Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit8279f68

Browse files
committed
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 environmentvariables involved. For example, PGSSL{MAX,MIN}PROTOCOLVERSION couldcause failures in the SSL tests. Even worse, a junk value ofPGCLIENTENCODING makes a server startup fail. The list of variablesreset is adjusted in each stable branch depending on what is supported.While on it, simplify a bit the code per a suggestion from AndrewDunstan, using a list of variables instead of doing single deletions.Reviewed-by: Andrew Dunstan, Daniel GustafssonDiscussion:https://postgr.es/m/YLbjjRpucIeZ78VQ@paquier.xyzBackpatch-through: 9.6
1 parent2955c2b commit8279f68

File tree

1 file changed

+32
-11
lines changed

1 file changed

+32
-11
lines changed

‎src/test/perl/TestLib.pm

Lines changed: 32 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -104,17 +104,38 @@ BEGIN
104104
delete$ENV{LC_ALL};
105105
$ENV{LC_MESSAGES} ='C';
106106

107-
delete$ENV{PGCONNECT_TIMEOUT};
108-
delete$ENV{PGDATA};
109-
delete$ENV{PGDATABASE};
110-
delete$ENV{PGHOSTADDR};
111-
delete$ENV{PGREQUIRESSL};
112-
delete$ENV{PGSERVICE};
113-
delete$ENV{PGSSLMODE};
114-
delete$ENV{PGUSER};
115-
delete$ENV{PGPORT};
116-
delete$ENV{PGHOST};
117-
delete$ENV{PG_COLOR};
107+
my@envkeys =qw (
108+
PGCHANNELBINDING
109+
PGCLIENTENCODING
110+
PGCONNECT_TIMEOUT
111+
PGDATA
112+
PGDATABASE
113+
PGGSSENCMODE
114+
PGGSSLIB
115+
PGHOSTADDR
116+
PGKRBSRVNAME
117+
PGPASSFILE
118+
PGPASSWORD
119+
PGREQUIREPEER
120+
PGREQUIRESSL
121+
PGSERVICE
122+
PGSERVICEFILE
123+
PGSSLCERT
124+
PGSSLCRL
125+
PGSSLCRLDIR
126+
PGSSLKEY
127+
PGSSLMAXPROTOCOLVERSION
128+
PGSSLMINPROTOCOLVERSION
129+
PGSSLMODE
130+
PGSSLROOTCERT
131+
PGSSLSNI
132+
PGTARGETSESSIONATTRS
133+
PGUSER
134+
PGPORT
135+
PGHOST
136+
PG_COLOR
137+
);
138+
delete@ENV{@envkeys};
118139

119140
$ENV{PGAPPNAME} = basename($0);
120141

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp