aboutsummaryrefslogtreecommitdiffstats
path: root/tests/testgitstorage.h
AgeCommit message (Collapse)Author
2017-04-29Add SPDX header to testsGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-03-04Use QTest cleanup method for proper test shutdownGravatar Jeremie Guichard
In case of QCOMPARE failure, code following the comparison is not executed, this results in application state not being properly resorted and often gives several test failures, when only one test really fails. Using QTest cleanup method allows restoring proper state, before next test is executed. Signed-off-by: Jeremie Guichard <djebrest@gmail.com>
2017-03-04Use proper QTest initialization method in TestGitStorageGravatar Jeremie Guichard
Method originally called testSetup is more a precondition to test execution rather than an actual test. QTest recommends to use initTestCase for that purpose. Signed-off-by: Jeremie Guichard <djebrest@gmail.com>
2017-02-24Make TestGitStorage::testGitStorageLocal parametrizableGravatar Jeremie Guichard
Make use of QTest "Data Driven Testing", allowing to test multiple repo base path values. Signed-off-by: Jeremie Guichard <djebrest@gmail.com>
2015-08-30Add test case for multi line dive notes mergingGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-25Cloud storage: second merge test, delete dive on one side, modify on otherGravatar Dirk Hohndel
Delete a dive while offline, modify it from a different system while online. Then resync. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-25Cloud storage: first test case for a very simple mergeGravatar Dirk Hohndel
- We add a dive while offline. - On a different computer (here simulated by a different local cache) we add a different file. - Now we go back to the previous local cache (the one where we added a different dive in the first step) and take that online (i.e., connect to cloud storage). Now both of the new dives should have been added to our data file. This is a rather trivial test with no conflict and a straight forward merge. We need to add a lot more test cases to make sure this works as expected and doesn't leave the user with a corrupt state. Ideally whatever happens, the user should never see an error... Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-25Cloud storage: test offline operationGravatar Dirk Hohndel
All this really does is make sure that the fast forward works if the local cache has received updates that haven't made it to the server, yet. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-25Cloud storage: add test for simple save / load from our test accountGravatar Dirk Hohndel
This will fail if the proxy settings of the user running the test are incorrect. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-25Add simple test for git storageGravatar Dirk Hohndel
This just makes sure that writing data to git storage and reading it back gives you the same result. Without the fixed generation of initial dive site UUIDs this fails. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>