aboutsummaryrefslogtreecommitdiffstats
path: root/tests/testgitstorage.h
AgeCommit message (Collapse)Author
2020-04-15testing/git-storage: fairly fundamental rewrite of the storage testGravatar Dirk Hohndel
The old test was broken in many ways and kept failing for a number of reasons. Some of them were addressed in the previous commits (the missing HEAD ref being the main one), the other one was that the tests kept stepping on top of each other - as were potentially random users or reviewers using the 'universal' test account. This uses a random one of ten dedicated test accounts, and on top of that uses a random branch name (instead of the fixed email address associated with the account). This also rewrites several of the tests dealing with offline changes to correctly model going offline (but keeps one that directly writes to the local cache). Finally this change also tries to do a much better job cleaning up after itself and not leaving data behind the the next run could stumble over. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-07-26Whitespace cleanup testsGravatar Dirk Hohndel
Again, entirely script based. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
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>