Skip to content

Commit

Permalink
Properly reset fakefolder test state post-placeholder file delete in …
Browse files Browse the repository at this point in the history
…testsyncvirtualfiles

Signed-off-by: Claudio Cambra <[email protected]>
  • Loading branch information
claucambra authored and backportbot[bot] committed Jun 28, 2024
1 parent fa735fd commit f843b5c
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion test/testsyncvirtualfiles.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,20 @@ private slots:
QVERIFY(fakeFolder.syncOnce());
QVERIFY(!fakeFolder.currentLocalState().find("A/a1"));
QVERIFY(!fakeFolder.currentLocalState().find("A/a1" DVSUFFIX));
QVERIFY(!fakeFolder.currentRemoteState().find("A/a1"));
QVERIFY(!fakeFolder.remoteModifier().find("A/a1"));
cleanup();

// Restore the state prior to next test
// Essentially repeating creation of virtual file
fakeFolder.remoteModifier().insert("A/a1", 64);
fakeFolder.remoteModifier().setModTime("A/a1", someDate);
QVERIFY(fakeFolder.syncOnce());
QVERIFY(!fakeFolder.currentLocalState().find("A/a1"));
QVERIFY(fakeFolder.currentLocalState().find("A/a1" DVSUFFIX));
QCOMPARE(QFileInfo(fakeFolder.localPath() + "A/a1" DVSUFFIX).lastModified(), someDate);
QVERIFY(fakeFolder.currentRemoteState().find("A/a1"));
QVERIFY(itemInstruction(completeSpy, "A/a1" DVSUFFIX, CSYNC_INSTRUCTION_NEW));
QCOMPARE(dbRecord(fakeFolder, "A/a1" DVSUFFIX)._type, ItemTypeVirtualFile);
cleanup();

// Remote rename is propagated
Expand Down

0 comments on commit f843b5c

Please sign in to comment.