refactor: replace os.Setenv with testing.SetEnv after upgrading to Go 1.17+
The following discussion from !642 (merged) should be addressed:
-
@proglottis started a discussion: Not strictly related to this change, but this testhelper will set previously unset envvars to empty string which can cause some programs to misbehave. Once the minimum version is v1.17 we can probably replace this method all together https://pkg.go.dev/testing#T.Setenv (and this already handles the previously unset env problem)