mirror of
https://github.com/rclone/rclone.git
synced 2025-08-09 21:57:59 +02:00
vfs: convert vfs options to new style
This also - move in use options (Opt) from vfsflags to vfscommon - change os.FileMode to vfscommon.FileMode in parameters - rework vfscommon.FileMode and add tests
This commit is contained in:
@ -19,7 +19,7 @@ import (
|
||||
)
|
||||
|
||||
func fileCreate(t *testing.T, mode vfscommon.CacheMode) (r *fstest.Run, vfs *VFS, fh *File, item fstest.Item) {
|
||||
opt := vfscommon.DefaultOpt
|
||||
opt := vfscommon.Opt
|
||||
opt.CacheMode = mode
|
||||
opt.WriteBack = writeBackDelay
|
||||
r, vfs = newTestVFSOpt(t, &opt)
|
||||
@ -48,7 +48,7 @@ func TestFileMethods(t *testing.T) {
|
||||
assert.Equal(t, true, file.IsFile())
|
||||
|
||||
// Mode
|
||||
assert.Equal(t, vfs.Opt.FilePerms, file.Mode())
|
||||
assert.Equal(t, os.FileMode(vfs.Opt.FilePerms), file.Mode())
|
||||
|
||||
// Name
|
||||
assert.Equal(t, "file1", file.Name())
|
||||
|
Reference in New Issue
Block a user