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

Commit9d66067

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 parent6753a5b commit9d66067

File tree

1 file changed

+31
-11
lines changed

1 file changed

+31
-11
lines changed

‎src/test/perl/TestLib.pm

Lines changed: 31 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -98,17 +98,37 @@ BEGIN
9898
delete$ENV{LC_ALL};
9999
$ENV{LC_MESSAGES} ='C';
100100

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

113133
$ENV{PGAPPNAME} = basename($0);
114134

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp