Skip to content

Commit

Permalink
fix: ProviderCacheWithProviderCacheDir test (#3656)
Browse files Browse the repository at this point in the history
* fix: run-lint error

* fix: run-strict-lint error
  • Loading branch information
levkohimins authored Dec 13, 2024
1 parent 38ceae2 commit 2a1c5eb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cli/provider_cache_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit 2a1c5eb

Please sign in to comment.