mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
chore: migrate from tenv linter to usetesting linter (#20401)
The tenv linter is deprecated in favor of usetesting which offers a superset of lint checks. This message is seen when running `make lint` ``` [nix-shell:~/src/coder]$ make lint <snip> WARN The linter 'tenv' is deprecated (since v1.64.0) due to: Duplicate feature in another linter. Replaced by usetesting. <snip> ``` This change swaps out the deprecated tenv linter for the usetesting linter, and configures it for linting parity. https://github.com/coder/coder/issues/20398
This commit is contained in:
@@ -35,12 +35,9 @@ func Test_TimezoneIANA(t *testing.T) {
|
||||
// This test can be flaky on some Windows runners :(
|
||||
t.Skip("This test is flaky under Windows.")
|
||||
}
|
||||
oldEnv, found := os.LookupEnv("TZ")
|
||||
_, found := os.LookupEnv("TZ")
|
||||
if found {
|
||||
require.NoError(t, os.Unsetenv("TZ"))
|
||||
t.Cleanup(func() {
|
||||
_ = os.Setenv("TZ", oldEnv)
|
||||
})
|
||||
}
|
||||
|
||||
zone, err := tz.TimezoneIANA()
|
||||
|
||||
Reference in New Issue
Block a user