From ee9c228012a462b81e7d71482ebbac93f9a6fbbb Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Wed, 23 Sep 2026 15:51:33 +0100 Subject: [PATCH] operations: fix TestMultithreadCopy leaving files behind when multipart upload is skipped When a backend rejected the multipart upload as too small, the subtest skipped without removing its local source file, so the following upload subtests failed their local listing checks. --- fs/operations/multithread_test.go | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/operations/multithread_test.go b/fs/operations/multithread_test.go index 7c3594c34..b89ea9c6a 100644 --- a/fs/operations/multithread_test.go +++ b/fs/operations/multithread_test.go @@ -223,6 +223,7 @@ func TestMultithreadCopy(t *testing.T) { dst, err = multiThreadCopy(ctx, fDst, fileName, src, test.streams, tr) if errors.Is(err, fs.ErrorFileTooSmall) { + require.NoError(t, src.Remove(ctx)) t.Skipf("file too small for multipart upload: %v", err) } require.NoError(t, err)