]> ruderich.org/simon Gitweb - safcm/safcm.git/commitdiff
tests: use filetest.CreateFifo() in config tests
authorSimon Ruderich <simon@ruderich.org>
Wed, 28 Apr 2021 06:29:49 +0000 (08:29 +0200)
committerSimon Ruderich <simon@ruderich.org>
Wed, 28 Apr 2021 10:31:20 +0000 (12:31 +0200)
cmd/safcm/config/files_test.go

index da04bf966c5de8ecac9bd74cdab9873e4fbca944..cc963c94a232ea3df776c11b45c76500f06ce110 100644 (file)
@@ -20,10 +20,10 @@ import (
        "io/fs"
        "os"
        "runtime"
-       "syscall"
        "testing"
 
        "ruderich.org/simon/safcm"
+       ft "ruderich.org/simon/safcm/cmd/safcm-remote/sync/filetest"
        "ruderich.org/simon/safcm/testutil"
 )
 
@@ -69,10 +69,7 @@ func TestLoadFiles(t *testing.T) {
                chmod("files-invalid-perm-file-sticky/files/etc/resolv.conf", 01644)
        }
 
-       err = syscall.Mkfifo("files-invalid-type/files/invalid", 0644)
-       if err != nil {
-               t.Fatal(err)
-       }
+       ft.CreateFifo("files-invalid-type/files/invalid", 0644)
        defer os.Remove("files-invalid-type/files/invalid")
 
        const errMsg = `