diff --git a/test/testsynccfapi.cpp b/test/testsynccfapi.cpp index 4b06b6e15cc72..95dd076ffc38f 100644 --- a/test/testsynccfapi.cpp +++ b/test/testsynccfapi.cpp @@ -1218,6 +1218,32 @@ private slots: CFVERIFY_VIRTUAL(fakeFolder, "online/sub/file1"); } } + + void testDataFingerPrint() + { + FakeFolder fakeFolder{ FileInfo{} }; + setupVfs(fakeFolder); + + fakeFolder.remoteModifier().mkdir("a"); + fakeFolder.remoteModifier().mkdir("a/b"); + fakeFolder.remoteModifier().mkdir("a/b/d"); + fakeFolder.remoteModifier().insert("a/b/otherFile.txt"); + + //Server support finger print, but none is set. + fakeFolder.remoteModifier().extraDavProperties = ""; + + fakeFolder.syncEngine().setLocalDiscoveryOptions(OCC::LocalDiscoveryStyle::DatabaseAndFilesystem); + QVERIFY(fakeFolder.syncOnce()); + + fakeFolder.remoteModifier().remove("a/b/otherFile.txt"); + fakeFolder.remoteModifier().remove("a/b/d"); + fakeFolder.remoteModifier().extraDavProperties = "initial_finger_print"; + + fakeFolder.syncEngine().setLocalDiscoveryOptions(OCC::LocalDiscoveryStyle::DatabaseAndFilesystem); + QVERIFY(fakeFolder.syncOnce()); + + QCOMPARE(fakeFolder.currentLocalState(), fakeFolder.currentRemoteState()); + } }; QTEST_GUILESS_MAIN(TestSyncCfApi)