From b323bf34e2313f692dd013921bf87079bea73bf8 Mon Sep 17 00:00:00 2001 From: Ivan Andreev Date: Mon, 1 Nov 2021 16:44:19 +0300 Subject: [PATCH] sync/test: skip test ConcurrentTruncate on uptobox (take 2) The test is not applicable to uptobox which can't upload empty files. The test was not skipped as intended because the direct error was compared. This fix will compare error Cause because Sync wraps the error. --- fs/sync/sync_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/sync/sync_test.go b/fs/sync/sync_test.go index 731ac9bfd..c5724a9cc 100644 --- a/fs/sync/sync_test.go +++ b/fs/sync/sync_test.go @@ -2091,7 +2091,7 @@ func testSyncConcurrent(t *testing.T, subtest string) { fstest.CheckItems(t, r.Fremote, itemsBefore...) stats.ResetErrors() err := Sync(ctx, r.Fremote, r.Flocal, false) - if err == fs.ErrorCantUploadEmptyFiles { + if errors.Cause(err) == fs.ErrorCantUploadEmptyFiles { t.Skipf("Skip test because remote cannot upload empty files") } assert.NoError(t, err, "Sync must not return a error")