Skip to content

"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files

vfs: skip rename tests on remotes which can't rename

Nick Craig-Wood1b89b38a4c67
diff --git a/vfs/file_test.go b/vfs/file_test.go
index cf1c1f195..7a07c9486 100644
--- a/vfs/file_test.go
+++ b/vfs/file_test.go
@@ -7,6 +7,7 @@ import (
"testing"
"github.com/rclone/rclone/fs"
+ "github.com/rclone/rclone/fs/operations"
"github.com/rclone/rclone/fstest"
"github.com/rclone/rclone/fstest/mockfs"
"github.com/rclone/rclone/fstest/mockobject"
@@ -246,6 +247,10 @@ func testFileRename(t *testing.T, mode CacheMode) {
defer r.Finalise()
vfs, file, item := fileCreate(t, r, mode)
+ if !operations.CanServerSideMove(r.Fremote) {
+ t.Skip("skip as can't rename files")
+ }
+
rootDir, err := vfs.Root()
require.NoError(t, err)