moby--moby/daemon/logger/splunk
Eng Zer Jun 36049a04d2
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-04-23 17:44:16 +08:00
..
splunk.go panic() instead of logrus.Fatal() in init funcs 2022-04-21 12:15:20 +02:00
splunk_test.go test: use `T.Setenv` to set env vars in tests 2022-04-23 17:44:16 +08:00
splunkhecmock_test.go refactor: move from io/ioutil to io and os package 2021-08-27 14:56:57 +08:00