Replaced os.Clearenv call to clear just variables under test

This commit is contained in:
inkychris 2019-03-16 13:17:47 +00:00
parent a08ef33f29
commit 3778ebe034

View file

@ -395,7 +395,8 @@ func TestEmptyEnv(t *testing.T) {
BindEnv("type") // Empty environment variable BindEnv("type") // Empty environment variable
BindEnv("name") // Bound, but not set environment variable BindEnv("name") // Bound, but not set environment variable
os.Clearenv() os.Unsetenv("type")
os.Unsetenv("name")
os.Setenv("TYPE", "") os.Setenv("TYPE", "")
@ -411,7 +412,8 @@ func TestEmptyEnv_Allowed(t *testing.T) {
BindEnv("type") // Empty environment variable BindEnv("type") // Empty environment variable
BindEnv("name") // Bound, but not set environment variable BindEnv("name") // Bound, but not set environment variable
os.Clearenv() os.Unsetenv("type")
os.Unsetenv("name")
os.Setenv("TYPE", "") os.Setenv("TYPE", "")