on main help sign in
chore: fmt
3e213e8Carlos Alexandro Becker
internal/fsext/ignore_test.go+6−6
@@ -18,12 +18,12 @@ func TestCrushIgnore(t *testing.T) {
18 defer os.Chdir(oldWd)
18 defer os.Chdir(oldWd)
19
19
20 // Create test files
20 // Create test files
21− require.NoError(t, os.WriteFile("test1.txt", []byte("test"), 0644))
21+ require.NoError(t, os.WriteFile("test1.txt", []byte("test"), 0o644))
22− require.NoError(t, os.WriteFile("test2.log", []byte("test"), 0644))
22+ require.NoError(t, os.WriteFile("test2.log", []byte("test"), 0o644))
23− require.NoError(t, os.WriteFile("test3.tmp", []byte("test"), 0644))
23+ require.NoError(t, os.WriteFile("test3.tmp", []byte("test"), 0o644))
24
24
25 // Create a .crushignore file that ignores .log files
25 // Create a .crushignore file that ignores .log files
26− require.NoError(t, os.WriteFile(".crushignore", []byte("*.log\n"), 0644))
26+ require.NoError(t, os.WriteFile(".crushignore", []byte("*.log\n"), 0o644))
27
27
28 // Test DirectoryLister
28 // Test DirectoryLister
29 t.Run("DirectoryLister respects .crushignore", func(t *testing.T) {
29 t.Run("DirectoryLister respects .crushignore", func(t *testing.T) {
@@ -37,8 +37,8 @@ func TestCrushIgnore(t *testing.T) {
37 // Test FastGlobWalker
37 // Test FastGlobWalker
38 t.Run("FastGlobWalker respects .crushignore", func(t *testing.T) {
38 t.Run("FastGlobWalker respects .crushignore", func(t *testing.T) {
39 walker := NewFastGlobWalker(tempDir)
39 walker := NewFastGlobWalker(tempDir)
40−
40+
41 require.True(t, walker.gitignore == nil, "gitignore should be nil")
41 require.True(t, walker.gitignore == nil, "gitignore should be nil")
42 require.NotNil(t, walker.crushignore, "crushignore should not be nil")
42 require.NotNil(t, walker.crushignore, "crushignore should not be nil")
43 })
43 })
44−}
44+}