github.com/10XDev/rclone@v1.52.3-0.20200626220027-16af9ab76b2a/vfs/vfstest_test.go (about) 1 // Run the more functional vfstest package on the vfs 2 3 package vfs_test 4 5 import ( 6 "testing" 7 8 _ "github.com/rclone/rclone/backend/all" // import all the backends 9 "github.com/rclone/rclone/fs" 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 17 func TestFunctional(t *testing.T) { 18 if *fstest.RemoteName != "" { 19 t.Skip("Skip on non local") 20 } 21 vfstest.RunTests(t, true, func(f fs.Fs, mountpoint string) (VFS *vfs.VFS, 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 VFS = vfs.New(f, nil) 28 return VFS, unmountResultChan, unmount, nil 29 }) 30 }