mirror of https://github.com/jackc/pgx.git
Fix TestParseConfigEnvLibpq unsetting envars
This would cause tests to fail if PG* variables were used for the
default connection config for other tests.
Previously broken by 0080acf318
.
pull/2017/head
parent
532bf8f583
commit
ded01c0cd9
|
@ -1003,13 +1003,8 @@ func TestParseConfigEnvLibpq(t *testing.T) {
|
|||
}
|
||||
|
||||
for i, tt := range tests {
|
||||
for _, n := range pgEnvvars {
|
||||
err := os.Unsetenv(n)
|
||||
require.NoError(t, err)
|
||||
}
|
||||
|
||||
for k, v := range tt.envvars {
|
||||
t.Setenv(k, v)
|
||||
for _, env := range pgEnvvars {
|
||||
t.Setenv(env, tt.envvars[env])
|
||||
}
|
||||
|
||||
config, err := pgconn.ParseConfig("")
|
||||
|
|
Loading…
Reference in New Issue