Skip to content

Commit

Permalink
add test for windows CfApi
Browse files Browse the repository at this point in the history
Signed-off-by: Matthieu Gallien <[email protected]>
  • Loading branch information
mgallien committed Mar 8, 2023
1 parent 9afd726 commit baf9c8b
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions test/testsynccfapi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 = "<oc:data-fingerprint></oc:data-fingerprint>";

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 = "<oc:data-fingerprint>initial_finger_print</oc:data-fingerprint>";

fakeFolder.syncEngine().setLocalDiscoveryOptions(OCC::LocalDiscoveryStyle::DatabaseAndFilesystem);
QVERIFY(fakeFolder.syncOnce());

QCOMPARE(fakeFolder.currentLocalState(), fakeFolder.currentRemoteState());
}
};

QTEST_GUILESS_MAIN(TestSyncCfApi)
Expand Down

0 comments on commit baf9c8b

Please sign in to comment.