2020-04-16 20:33:46 +08:00
|
|
|
// Run the more functional vfstest package on the vfs
|
|
|
|
|
|
|
|
package vfs_test
|
|
|
|
|
|
|
|
import (
|
|
|
|
"testing"
|
|
|
|
|
|
|
|
_ "github.com/rclone/rclone/backend/all" // import all the backends
|
|
|
|
"github.com/rclone/rclone/fstest"
|
|
|
|
"github.com/rclone/rclone/vfs"
|
|
|
|
"github.com/rclone/rclone/vfs/vfstest"
|
|
|
|
)
|
|
|
|
|
|
|
|
// TestExt runs more functional tests all the tests against all the
|
|
|
|
// VFS cache modes
|
|
|
|
func TestFunctional(t *testing.T) {
|
|
|
|
if *fstest.RemoteName != "" {
|
|
|
|
t.Skip("Skip on non local")
|
|
|
|
}
|
2020-07-23 00:58:49 +08:00
|
|
|
vfstest.RunTests(t, true, func(VFS *vfs.VFS, mountpoint string) (unmountResult <-chan error, unmount func() error, err error) {
|
2020-04-16 20:33:46 +08:00
|
|
|
unmountResultChan := make(chan (error), 1)
|
|
|
|
unmount = func() error {
|
|
|
|
unmountResultChan <- nil
|
|
|
|
return nil
|
|
|
|
}
|
2020-07-23 00:58:49 +08:00
|
|
|
return unmountResultChan, unmount, nil
|
2020-04-16 20:33:46 +08:00
|
|
|
})
|
|
|
|
}
|