testing/git-storage: fairly fundamental rewrite of the storage test

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>
This commit is contained in:
Dirk Hohndel 2020-04-11 12:26:55 -07:00
parent f24cbbcb2c
commit 20f0a82b4e
2 changed files with 174 additions and 83 deletions

View file

@ -9,6 +9,7 @@ class TestGitStorage : public QObject {
private slots:
void initTestCase();
void cleanup();
void cleanupTestCase();
void testGitStorageLocal_data();
void testGitStorageLocal();