]> ruderich.org/simon Gitweb - safcm/safcm.git/commitdiff
sync: tests: use CreateDirectoryExists()
authorSimon Ruderich <simon@ruderich.org>
Sun, 9 May 2021 10:14:16 +0000 (12:14 +0200)
committerSimon Ruderich <simon@ruderich.org>
Sun, 9 May 2021 13:15:43 +0000 (15:15 +0200)
cmd/safcm-remote/sync/files_test.go

index 5787404519936d519272a5050cebfec467ec64b1..2e3ed3eb2bca67a994232a3a2d9dc2502d77d982 100644 (file)
@@ -415,10 +415,7 @@ func TestSyncFiles(t *testing.T) {
                                },
                        },
                        func() {
-                               err = os.Chmod(".", 0750)
-                               if err != nil {
-                                       panic(err)
-                               }
+                               ft.CreateDirectoryExists(".", 0750)
                                ft.CreateDirectory("dir", 0755)
                                ft.CreateFile("dir/file", "content\n", 0644)
                        },