mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-24 22:15:57 +03:00
b7ff4a76e8
To be able to test the SyncEngine efficiently, a set of server mocking classes have been implemented on top of QNetworkAccessManager. The local disk side hasn't been mocked since this would require adding a large abstraction layer in csync. The SyncEngine is instead pointed to a different temporary dir in each test and we test by interacting with files in this directory instead. The FakeFolder object wraps the SyncEngine with those abstractions and allow controlling the local files, and the fake remote state through the FileModifier interface, using a FileInfo tree structure for the remote-side implementation as well as feeding and comparing the states on both side in tests. Tests run fast and require no setup to be run, but each server feature that we want to test on the client side needs to be implemented in this fake objects library. For example, the OC-FileId header isn't set as of this commit, and we can't test the file move logic properly without implementing it first. The TestSyncFileStatusTracker tests already contain a few QEXPECT_FAIL for what I esteem being issues that need to be fixed in order to catch up on our test coverage without making this patch too huge.
28 lines
918 B
C
28 lines
918 B
C
#ifndef CONFIG_H
|
|
#define CONFIG_H
|
|
|
|
#cmakedefine USE_INOTIFY 1
|
|
#cmakedefine WITH_QTKEYCHAIN 1
|
|
#cmakedefine WITH_CRASHREPORTER
|
|
#cmakedefine CRASHREPORTER_EXECUTABLE "@CRASHREPORTER_EXECUTABLE@"
|
|
#define SOCKETAPI_TEAM_IDENTIFIER_PREFIX "@SOCKETAPI_TEAM_IDENTIFIER_PREFIX@"
|
|
|
|
#cmakedefine APPLICATION_DOMAIN @APPLICATION_DOMAIN@
|
|
#cmakedefine THEME_CLASS @THEME_CLASS@
|
|
#cmakedefine THEME_INCLUDE @THEME_INCLUDE@
|
|
|
|
#cmakedefine APPLICATION_NAME "@APPLICATION_NAME@"
|
|
#cmakedefine APPLICATION_VENDOR "@APPLICATION_VENDOR@"
|
|
#cmakedefine APPLICATION_REV_DOMAIN "@APPLICATION_REV_DOMAIN@"
|
|
#cmakedefine APPLICATION_SHORTNAME "@APPLICATION_SHORTNAME@"
|
|
#cmakedefine APPLICATION_EXECUTABLE "@APPLICATION_EXECUTABLE@"
|
|
#cmakedefine APPLICATION_UPDATE_URL "@APPLICATION_UPDATE_URL@"
|
|
|
|
#cmakedefine ZLIB_FOUND @ZLIB_FOUND@
|
|
|
|
#cmakedefine SYSCONFDIR "@SYSCONFDIR@"
|
|
#cmakedefine SHAREDIR "@SHAREDIR@"
|
|
|
|
#cmakedefine WITH_UNIT_TESTING 1
|
|
|
|
#endif
|