From: Matthieu Gallien Date: Thu, 27 Oct 2022 16:00:10 +0000 (+0200) Subject: new autotest to ensure that we delete folders despite blacklist errors X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~12^2~11^2~155^2~1 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=783cefe3f1efee67a99fc5048d5ce5bc3d284509;p=nextcloud-desktop.git new autotest to ensure that we delete folders despite blacklist errors Signed-off-by: Matthieu Gallien --- diff --git a/test/testsyncmove.cpp b/test/testsyncmove.cpp index f1488c818..c8f5ac2d6 100644 --- a/test/testsyncmove.cpp +++ b/test/testsyncmove.cpp @@ -890,6 +890,29 @@ private slots: QCOMPARE(fakeFolder.currentLocalState(), fakeFolder.currentRemoteState()); } + void testRenameParallelismWithBlacklist() + { + constexpr auto testFileName = "blackListFile"; + FakeFolder fakeFolder{ FileInfo{} }; + fakeFolder.remoteModifier().mkdir("A"); + fakeFolder.remoteModifier().insert("A/file"); + + QVERIFY(fakeFolder.syncOnce()); + QCOMPARE(fakeFolder.currentLocalState(), fakeFolder.currentRemoteState()); + + fakeFolder.remoteModifier().insert(testFileName); + fakeFolder.serverErrorPaths().append(testFileName, 500); // will be blacklisted + QVERIFY(!fakeFolder.syncOnce()); + + fakeFolder.remoteModifier().mkdir("B"); + fakeFolder.remoteModifier().rename("A/file", "B/file"); + fakeFolder.remoteModifier().remove("A"); + + QVERIFY(!fakeFolder.syncOnce()); + auto folderA = fakeFolder.currentLocalState().find("A"); + QCOMPARE(folderA, nullptr); + } + void testMovedWithError_data() { QTest::addColumn("vfsMode");