diff --git a/cli/provider_cache_test.go b/cli/provider_cache_test.go index cfbb48fea..bea090d1a 100644 --- a/cli/provider_cache_test.go +++ b/cli/provider_cache_test.go @@ -167,12 +167,14 @@ func TestProviderCache(t *testing.T) { func TestProviderCacheWithProviderCacheDir(t *testing.T) { // testing.T can Setenv, but can't Unsetenv unsetEnv := func(t *testing.T, v string) { + t.Helper() + // let testing.T do the recovery and work around t.Parallel() t.Setenv(v, "") require.NoError(t, os.Unsetenv(v)) } - t.Run("Homeless", func(t *testing.T) { + t.Run("Homeless", func(t *testing.T) { //nolint:paralleltest cacheDir := t.TempDir() unsetEnv(t, "HOME")