This commit is contained in:
@@ -435,3 +435,18 @@ func addDevice2(t testing.TB, w config.Wrapper, fcfg config.FolderConfiguration)
|
||||
must(t, err)
|
||||
waiter.Wait()
|
||||
}
|
||||
|
||||
func writeFile(t testing.TB, filesystem fs.Filesystem, name string, data []byte) {
|
||||
t.Helper()
|
||||
fd, err := filesystem.Create(name)
|
||||
must(t, err)
|
||||
defer fd.Close()
|
||||
_, err = fd.Write(data)
|
||||
must(t, err)
|
||||
}
|
||||
|
||||
func writeFilePerm(t testing.TB, filesystem fs.Filesystem, name string, data []byte, perm fs.FileMode) {
|
||||
t.Helper()
|
||||
writeFile(t, filesystem, name, data)
|
||||
must(t, filesystem.Chmod(name, perm))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user