1
0
mirror of https://github.com/rclone/rclone.git synced 2025-12-15 07:43:35 +00:00

vfs: factor the vfs cache into its own package

This commit is contained in:
Nick Craig-Wood
2020-02-28 14:44:15 +00:00
parent 2b268f9724
commit 40b9e312c6
21 changed files with 408 additions and 362 deletions

View File

@@ -6,10 +6,9 @@ import (
"runtime"
"testing"
"github.com/rclone/rclone/vfs/vfscommon"
"github.com/stretchr/testify/assert"
"golang.org/x/sys/unix"
"github.com/rclone/rclone/vfs"
)
// TestWriteFileDoubleClose tests double close on write
@@ -45,7 +44,7 @@ func TestWriteFileDoubleClose(t *testing.T) {
// write to the other dup
_, err = unix.Write(fd2, buf)
if run.vfs.Opt.CacheMode < vfs.CacheModeWrites {
if run.vfs.Opt.CacheMode < vfscommon.CacheModeWrites {
// produces an error if cache mode < writes
assert.Error(t, err, "input/output error")
} else {