2
2
mirror of https://github.com/octoleo/restic.git synced 2024-06-03 09:30:50 +00:00

restorer: Skip preallocate test if not supported by the filesystem

This commit is contained in:
Michael Eischer 2021-03-04 20:33:46 +01:00
parent 814a399e4c
commit f70aca6f6f

View File

@ -4,6 +4,7 @@ import (
"os" "os"
"path" "path"
"strconv" "strconv"
"syscall"
"testing" "testing"
"github.com/restic/restic/internal/fs" "github.com/restic/restic/internal/fs"
@ -24,6 +25,9 @@ func TestPreallocate(t *testing.T) {
}() }()
err = preallocateFile(wr, i) err = preallocateFile(wr, i)
if err == syscall.ENOTSUP {
t.SkipNow()
}
test.OK(t, err) test.OK(t, err)
fi, err := wr.Stat() fi, err := wr.Stat()