From 1d4e4fafcc835e7c5631b883b6019b32eaa3cacd Mon Sep 17 00:00:00 2001 From: Christian Kamm Date: Fri, 19 Oct 2018 10:24:47 +0200 Subject: [PATCH] Discovery: Add back virtual file instruction checks --- test/testsyncvirtualfiles.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/test/testsyncvirtualfiles.cpp b/test/testsyncvirtualfiles.cpp index de6026fbd..7a3964c4d 100644 --- a/test/testsyncvirtualfiles.cpp +++ b/test/testsyncvirtualfiles.cpp @@ -145,7 +145,10 @@ private slots: QVERIFY(fakeFolder.currentLocalState().find("A/a1m.owncloud")); QVERIFY(!fakeFolder.currentRemoteState().find("A/a1")); QVERIFY(fakeFolder.currentRemoteState().find("A/a1m")); - //QVERIFY(itemInstruction(completeSpy, "A/a1m.owncloud", CSYNC_INSTRUCTION_RENAME)); + QVERIFY( + itemInstruction(completeSpy, "A/a1m.owncloud", CSYNC_INSTRUCTION_RENAME) + || (itemInstruction(completeSpy, "A/a1m.owncloud", CSYNC_INSTRUCTION_NEW) + && itemInstruction(completeSpy, "A/a1.owncloud", CSYNC_INSTRUCTION_REMOVE))); QCOMPARE(dbRecord(fakeFolder, "A/a1m.owncloud")._type, ItemTypeVirtualFile); cleanup(); @@ -173,9 +176,10 @@ private slots: fakeFolder.syncEngine().setLocalDiscoveryOptions(LocalDiscoveryStyle::FilesystemOnly); QVERIFY(fakeFolder.syncOnce()); QVERIFY(fakeFolder.currentLocalState().find("A/a2.owncloud")); - //QVERIFY(itemInstruction(completeSpy, "A/a2.owncloud", CSYNC_INSTRUCTION_NEW)); + QVERIFY(itemInstruction(completeSpy, "A/a2.owncloud", CSYNC_INSTRUCTION_UPDATE_METADATA)); QVERIFY(dbRecord(fakeFolder, "A/a2.owncloud").isValid()); QVERIFY(!fakeFolder.currentLocalState().find("A/a3.owncloud")); + QVERIFY(itemInstruction(completeSpy, "A/a3.owncloud", CSYNC_INSTRUCTION_REMOVE)); QVERIFY(!dbRecord(fakeFolder, "A/a3.owncloud").isValid()); cleanup(); }