2020-04-16 12:33:46 +00: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
|
2020-07-23 16:17:01 +00:00
|
|
|
"github.com/rclone/rclone/cmd/mountlib"
|
2020-04-16 12:33:46 +00:00
|
|
|
"github.com/rclone/rclone/fstest"
|
|
|
|
"github.com/rclone/rclone/vfs"
|
2023-10-04 17:33:12 +00:00
|
|
|
"github.com/rclone/rclone/vfs/vfscommon"
|
2020-04-16 12:33:46 +00:00
|
|
|
"github.com/rclone/rclone/vfs/vfstest"
|
|
|
|
)
|
|
|
|
|
2024-05-15 07:58:09 +00:00
|
|
|
// TestFunctional runs more functional tests all the tests against all the
|
2020-04-16 12:33:46 +00:00
|
|
|
// VFS cache modes
|
|
|
|
func TestFunctional(t *testing.T) {
|
|
|
|
if *fstest.RemoteName != "" {
|
|
|
|
t.Skip("Skip on non local")
|
|
|
|
}
|
2023-10-04 17:33:12 +00:00
|
|
|
vfstest.RunTests(t, true, vfscommon.CacheModeOff, true, func(VFS *vfs.VFS, mountpoint string, opt *mountlib.Options) (unmountResult <-chan error, unmount func() error, err error) {
|
2020-04-16 12:33:46 +00:00
|
|
|
unmountResultChan := make(chan (error), 1)
|
|
|
|
unmount = func() error {
|
|
|
|
unmountResultChan <- nil
|
|
|
|
return nil
|
|
|
|
}
|
2020-07-22 16:58:49 +00:00
|
|
|
return unmountResultChan, unmount, nil
|
2020-04-16 12:33:46 +00:00
|
|
|
})
|
|
|
|
}
|