Amend behaviour of suffix virtual files test to reflect new expected behaviour
authorClaudio Cambra <claudio.cambra@nextcloud.com>
Tue, 25 Jun 2024 15:26:15 +0000 (23:26 +0800)
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>
Fri, 28 Jun 2024 16:18:01 +0000 (16:18 +0000)
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
test/testsyncvirtualfiles.cpp

index c6e9dab8b99d26b393f40e81dfb424d8aa7ae06c..29f03c29a9769a26bdd8cbf10c98c2e26c4d5cb3 100644 (file)
@@ -167,17 +167,14 @@ private slots:
         QCOMPARE(dbRecord(fakeFolder, "A/a1" DVSUFFIX)._fileSize, 65);
         cleanup();
 
-        // If the local virtual file file is removed, it'll just be recreated
+        // If the local virtual file is removed, it should be gone remotely too
         if (!doLocalDiscovery)
             fakeFolder.syncEngine().setLocalDiscoveryOptions(LocalDiscoveryStyle::DatabaseAndFilesystem, { "A" });
         fakeFolder.localModifier().remove("A/a1" DVSUFFIX);
         QVERIFY(fakeFolder.syncOnce());
         QVERIFY(!fakeFolder.currentLocalState().find("A/a1"));
-        QVERIFY(fakeFolder.currentLocalState().find("A/a1" DVSUFFIX));
-        QVERIFY(fakeFolder.currentRemoteState().find("A/a1"));
-        QVERIFY(itemInstruction(completeSpy, "A/a1" DVSUFFIX, CSYNC_INSTRUCTION_NEW));
-        QCOMPARE(dbRecord(fakeFolder, "A/a1" DVSUFFIX)._type, ItemTypeVirtualFile);
-        QCOMPARE(dbRecord(fakeFolder, "A/a1" DVSUFFIX)._fileSize, 65);
+        QVERIFY(!fakeFolder.currentLocalState().find("A/a1" DVSUFFIX));
+        QVERIFY(!fakeFolder.currentRemoteState().find("A/a1"));
         cleanup();
 
         // Remote rename is propagated