mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-22 04:55:48 +03:00
Properly reset fakefolder test state post-placeholder file delete in testsyncvirtualfiles
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
This commit is contained in:
parent
0757e94b50
commit
2915e2517e
1 changed files with 14 additions and 1 deletions
|
@ -182,7 +182,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
|
||||
|
|
Loading…
Reference in a new issue