Skip to content

Commit dfbdecd

Browse files
committed
fix lint warning
1 parent a9d2744 commit dfbdecd

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

internal/config/types_test.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,16 +85,15 @@ func TestTypes_isAllowedDir(t *testing.T) {
8585
symlinkPath := "file_link"
8686

8787
// Create a temp directory for the symlink
88-
tempDir, err := os.MkdirTemp("", "symlink_test")
89-
require.NoError(t, err)
88+
tempDir := t.TempDir()
9089
defer os.RemoveAll(tempDir) // Clean up the temp directory after the test
9190

9291
// Ensure the temp directory is in the allowedDirs
9392
allowedDirs = append(allowedDirs, tempDir)
9493

9594
filePath = tempDir + "/" + filePath
9695
defer os.RemoveAll(filePath)
97-
err = os.WriteFile(filePath, []byte("test content"), 0o600)
96+
err := os.WriteFile(filePath, []byte("test content"), 0o600)
9897
require.NoError(t, err)
9998

10099
// Create a symlink for testing

0 commit comments

Comments
 (0)