"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files
Go azure-blobazure-blob-storageazure-filesbackblaze-b2cloud-storagedropboxencryptionftpfuse-filesystemgogolanggoogle-cloud-storagegoogle-driveonedriveopenstack-swiftrclones3sftpsyncwebdav
acd: extend move test to check conflict cases for two step rename+move
Stefan Breunig77f38cb6f188
diff --git a/fstest/fstests/fstests.go b/fstest/fstests/fstests.goindex 62699a4fd..660566639 100644--- a/fstest/fstests/fstests.go+++ b/fstest/fstests/fstests.go@@ -405,30 +405,52 @@ func TestFsMove(t *testing.T) {t.Skip("FS has no Mover interface")}+ // state of files now:+ // 1: file name.txt+ // 2: hello sausage?/../z.txt+var file1Move = file1- file1Move.Path += "-move"+ var file2Move = file2- // do the move- src := findObject(t, file1.Path)- dst, err := remote.(fs.Mover).Move(src, file1Move.Path)+ // check happy path, i.e. no naming conflicts when rename and move are two+ // separate operations+ file2Move.Path = "other.txt"+ src := findObject(t, file2.Path)+ dst, err := remote.(fs.Mover).Move(src, file2Move.Path)if err == fs.ErrorCantMove {t.Skip("FS can't move")}require.NoError(t, err)-// check file exists in new listing- fstest.CheckListing(t, remote, []fstest.Item{file2, file1Move})-+ fstest.CheckListing(t, remote, []fstest.Item{file1, file2Move})// Check dst lightly - list above has checked ModTime/Hashes- assert.Equal(t, file1Move.Path, dst.Remote())+ assert.Equal(t, file2Move.Path, dst.Remote())+ // 1: file name.txt+ // 2: other.txt++ // Check conflict on "rename, then move"+ file1Move.Path = "moveTest/other.txt"+ src = findObject(t, file1.Path)+ _, err = remote.(fs.Mover).Move(src, file1Move.Path)+ require.NoError(t, err)+ fstest.CheckListing(t, remote, []fstest.Item{file1Move, file2Move})+ // 1: moveTest/other.txt+ // 2: other.txt- // move it back+ // Check conflict on "move, then rename"src = findObject(t, file1Move.Path)_, err = remote.(fs.Mover).Move(src, file1.Path)require.NoError(t, err)+ fstest.CheckListing(t, remote, []fstest.Item{file1, file2Move})+ // 1: file name.txt+ // 2: other.txt- // check file exists in new listing- fstest.CheckListing(t, remote, []fstest.Item{file2, file1})+ src = findObject(t, file2Move.Path)+ _, err = remote.(fs.Mover).Move(src, file2.Path)+ require.NoError(t, err)+ fstest.CheckListing(t, remote, []fstest.Item{file1, file2})+ // 1: file name.txt+ // 2: hello sausage?/../z.txt}// Move src to this remote using server side move operations.