summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2019-12-29 13:29:08 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2019-12-29 13:29:08 -0800
commita85b0896b415cc4e7b69dbe142fed63bed935e7a (patch)
treed3e9591094a54408755d786f2607e393b4848c1e /tests
parent7641a6263fa3b45d42e428ab4591c58d00467a0f (diff)
downloadsubsurface-a85b0896b415cc4e7b69dbe142fed63bed935e7a.tar.gz
tests: fix TestGitStorage in a mobile build
The default behavior of parse_file() is different between a desktop build and a mobile build. This makes parse_file() always assume that it's ok to connect to the cloud. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/testgitstorage.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/testgitstorage.cpp b/tests/testgitstorage.cpp
index 083887850..40de47d24 100644
--- a/tests/testgitstorage.cpp
+++ b/tests/testgitstorage.cpp
@@ -9,6 +9,7 @@
#include "core/settings/qPrefProxy.h"
#include "core/settings/qPrefCloudStorage.h"
#include "core/trip.h"
+#include "core/git-access.h"
#include <QDir>
#include <QTextStream>
@@ -52,6 +53,9 @@ void TestGitStorage::initTestCase()
QString localCacheDir(get_local_dir("https://cloud.subsurface-divelog.org/git/ssrftest@hohndel.org", "ssrftest@hohndel.org"));
QDir localCacheDirectory(localCacheDir);
QCOMPARE(localCacheDirectory.removeRecursively(), true);
+
+ // make sure that regardless of whether this is a desktop or mobile build, we always check with the cloud
+ git_local_only = false;
}
void TestGitStorage::cleanup()