We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a9d2744 commit dfbdecdCopy full SHA for dfbdecd
internal/config/types_test.go
@@ -85,16 +85,15 @@ func TestTypes_isAllowedDir(t *testing.T) {
85
symlinkPath := "file_link"
86
87
// Create a temp directory for the symlink
88
- tempDir, err := os.MkdirTemp("", "symlink_test")
89
- require.NoError(t, err)
+ tempDir := t.TempDir()
90
defer os.RemoveAll(tempDir) // Clean up the temp directory after the test
91
92
// Ensure the temp directory is in the allowedDirs
93
allowedDirs = append(allowedDirs, tempDir)
94
95
filePath = tempDir + "/" + filePath
96
defer os.RemoveAll(filePath)
97
- err = os.WriteFile(filePath, []byte("test content"), 0o600)
+ err := os.WriteFile(filePath, []byte("test content"), 0o600)
98
require.NoError(t, err)
99
100
// Create a symlink for testing
0 commit comments