mirror of
https://github.com/spf13/viper
synced 2025-05-07 12:47:18 +00:00
Replaced os.Clearenv call to clear just variables under test
This commit is contained in:
parent
a08ef33f29
commit
3778ebe034
1 changed files with 4 additions and 2 deletions
|
@ -395,7 +395,8 @@ func TestEmptyEnv(t *testing.T) {
|
|||
BindEnv("type") // Empty environment variable
|
||||
BindEnv("name") // Bound, but not set environment variable
|
||||
|
||||
os.Clearenv()
|
||||
os.Unsetenv("type")
|
||||
os.Unsetenv("name")
|
||||
|
||||
os.Setenv("TYPE", "")
|
||||
|
||||
|
@ -411,7 +412,8 @@ func TestEmptyEnv_Allowed(t *testing.T) {
|
|||
BindEnv("type") // Empty environment variable
|
||||
BindEnv("name") // Bound, but not set environment variable
|
||||
|
||||
os.Clearenv()
|
||||
os.Unsetenv("type")
|
||||
os.Unsetenv("name")
|
||||
|
||||
os.Setenv("TYPE", "")
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue