moby--moby/pkg/jsonmessage
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
..
jsonmessage.go remove uses of deprecated pkg/term 2020-04-21 16:29:27 +02:00
jsonmessage_test.go test: use `T.Setenv` to set env vars in tests 2022-04-23 17:44:16 +08:00