1// Run the more functional vfstest package on the vfs 2 3package vfs_test 4 5import ( 6 "testing" 7 8 _ "github.com/rclone/rclone/backend/all" // import all the backends 9 "github.com/rclone/rclone/cmd/mountlib" 10 "github.com/rclone/rclone/fstest" 11 "github.com/rclone/rclone/vfs" 12 "github.com/rclone/rclone/vfs/vfstest" 13) 14 15// TestExt runs more functional tests all the tests against all the 16// VFS cache modes 17func TestFunctional(t *testing.T) { 18 if *fstest.RemoteName != "" { 19 t.Skip("Skip on non local") 20 } 21 vfstest.RunTests(t, true, func(VFS *vfs.VFS, mountpoint string, opt *mountlib.Options) (unmountResult <-chan error, unmount func() error, err error) { 22 unmountResultChan := make(chan (error), 1) 23 unmount = func() error { 24 unmountResultChan <- nil 25 return nil 26 } 27 return unmountResultChan, unmount, nil 28 }) 29} 30