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)
committerMatthieu Gallien <matthieu_gallien@yahoo.fr>
Fri, 28 Jun 2024 16:17:19 +0000 (18:17 +0200)
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
test/testsyncvirtualfiles.cpp

index 44759da6ad5d6beb99ca17fe79eafac2edadbdea..b561eb2c94e80526dab5e784ca27f32fd948c8de 100644 (file)
@@ -175,17 +175,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