Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/owncloud/client.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJocelyn Turcotte <jturcotte@woboq.com>2016-08-04 15:59:46 +0300
committerJocelyn Turcotte <jturcotte@woboq.com>2016-08-17 16:39:30 +0300
commitb7ff4a76e8643d6a23c9f36b4f3e4e0cf7373867 (patch)
treecd0fbde246ce7d19c7ff575ae5447d7266c3846e /test/CMakeLists.txt
parent2507ba981853b76fcd5054613f0ee65ce20a4422 (diff)
Add TestSyncEngine and TestSyncFileStatusTracker auto tests
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.
Diffstat (limited to 'test/CMakeLists.txt')
-rw-r--r--test/CMakeLists.txt4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index f701700aa..40c964991 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -42,6 +42,10 @@ owncloud_add_test(FileSystem "")
owncloud_add_test(ChecksumValidator "")
owncloud_add_test(ExcludedFiles "")
+if(NOT BUILD_WITH_QT4)
+ owncloud_add_test(SyncEngine "syncenginetestutils.h")
+ owncloud_add_test(SyncFileStatusTracker "syncenginetestutils.h")
+endif(NOT BUILD_WITH_QT4)
SET(FolderMan_SRC ../src/gui/folderman.cpp)
list(APPEND FolderMan_SRC ../src/gui/folder.cpp )