2
2
mirror of https://github.com/octoleo/restic.git synced 2024-06-15 15:22:22 +00:00

Merge pull request #3319 from MichaelEischer/skip-prealloc-test

restorer: Skip preallocate test if not supported by the filesystem
This commit is contained in:
rawtaz 2021-04-07 18:59:06 +02:00 committed by GitHub
commit 74c0607c92
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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