From ea465cbb97d97a2257ff70ddcd54fb7230a9f950 Mon Sep 17 00:00:00 2001 From: nielash Date: Wed, 21 Oct 2026 06:44:42 -0400 Subject: [PATCH] operations: skip the Unicode move test where NFD names aren't kept Before this change, `TestMoveUnicodeEquivalentWithoutServerSideMove` failed on backends that can't store a file under the NFD name it was given: `mailru` rejects the name ("invalid characters in object name"), and `cloudinary`, `filelu` and `seafile` don't find the file again under it. Tests in `fs/operations` run against every backend, so this one needs to skip where the precondition doesn't hold. After this change, the test skips when the NFD name can't be uploaded or the file isn't found again under it. --- fs/operations/operations_test.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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)