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

operations: skip the Unicode move test where NFD names aren't kept

nielashea465cbb97d9
diff --git a/fs/operations/operations_test.go b/fs/operations/operations_test.go
index cc9a487f6..6f2cc6c12 100644
--- a/fs/operations/operations_test.go
+++ b/fs/operations/operations_test.go
@@ -1172,8 +1172,15 @@ func TestMoveUnicodeEquivalentWithoutServerSideMove(t *testing.T) {
nfd := norm.NFD.String("sub/équivalent.txt")
nfc := norm.NFC.String("sub/équivalent.txt")
- file1 := r.WriteObject(ctx, nfd, "file1 contents", t1)
+ file1 := fstest.NewItem(nfd, "file1 contents", t1)
+ _, err := r.Fremote.Put(ctx, bytes.NewBufferString("file1 contents"), object.NewStaticObjectInfo(nfd, t1, file1.Size, true, nil, nil))
+ if err != nil {
+ t.Skipf("remote can't store an NFD name: %v", err)
+ }
src, err := r.Fremote.NewObject(ctx, nfd)
+ if errors.Is(err, fs.ErrorObjectNotFound) {
+ t.Skip("remote doesn't keep an NFD name as written")
+ }
require.NoError(t, err)
_, err = operations.Move(ctx, r.Fremote, nil, nfc, src)