From: Simon Ruderich Date: Wed, 28 Apr 2021 06:29:49 +0000 (+0200) Subject: tests: use filetest.CreateFifo() in config tests X-Git-Url: https://ruderich.org/simon/gitweb/?a=commitdiff_plain;h=8bf2ac237af2faacd963485696c499c46b5a11e5;p=safcm%2Fsafcm.git tests: use filetest.CreateFifo() in config tests --- diff --git a/cmd/safcm/config/files_test.go b/cmd/safcm/config/files_test.go index da04bf9..cc963c9 100644 --- a/cmd/safcm/config/files_test.go +++ b/cmd/safcm/config/files_test.go @@ -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 = `