mirror of
https://github.com/rclone/rclone.git
synced 2025-12-12 06:24:14 +01:00
vfs: add read write files and caching #711
This adds new flags to mount, cmount, serve *
--cache-max-age duration Max age of objects in the cache. (default 1h0m0s)
--cache-mode string Cache mode off|minimal|writes|full (default "off")
--cache-poll-interval duration Interval to poll the cache for stale objects. (default 1m0s)
This commit is contained in:
@@ -160,7 +160,7 @@ func TestFileOpen(t *testing.T) {
|
||||
_, file, _ := fileCreate(t, r)
|
||||
|
||||
fd, err := file.Open(os.O_RDONLY)
|
||||
assert.NoError(t, err)
|
||||
require.NoError(t, err)
|
||||
_, ok := fd.(*ReadFileHandle)
|
||||
assert.True(t, ok)
|
||||
require.NoError(t, fd.Close())
|
||||
@@ -171,12 +171,6 @@ func TestFileOpen(t *testing.T) {
|
||||
assert.True(t, ok)
|
||||
require.NoError(t, fd.Close())
|
||||
|
||||
fd, err = file.Open(os.O_RDWR | os.O_TRUNC)
|
||||
assert.NoError(t, err)
|
||||
_, ok = fd.(*WriteFileHandle)
|
||||
assert.True(t, ok)
|
||||
require.NoError(t, fd.Close())
|
||||
|
||||
fd, err = file.Open(os.O_RDWR)
|
||||
assert.Equal(t, EPERM, err)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user