minikube/pkg/util
Eng Zer Jun 9d85be1a99
test: use `T.Setenv` to set env vars in tests
This commit replaces `os.Setenv` with `t.Setenv` in tests. The
environment variable is automatically restored to its original value
when the test and all its subtests complete.

Reference: https://pkg.go.dev/testing#T.Setenv
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2022-11-08 10:30:29 +08:00
..
lock Move from deprecated ioutil to os and io packages 2021-10-08 08:57:19 +08:00
retry bump go mod libs manually 2021-06-29 15:24:59 -04:00
constants.go Add podSubnet to templates 2020-01-07 13:54:00 -08:00
constants_test.go add unit test for GetDNSIP 2019-12-20 17:32:50 +08:00
crypto.go Move from deprecated ioutil to os and io packages 2021-10-08 08:57:19 +08:00
crypto_test.go replace MkdirTemp with t.TempDir in tests 2022-04-01 19:18:20 -07:00
utils.go move RemoveDuplicateStrings to util 2022-08-09 14:27:35 -07:00
utils_test.go test: use `T.Setenv` to set env vars in tests 2022-11-08 10:30:29 +08:00