From a85b0896b415cc4e7b69dbe142fed63bed935e7a Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Sun, 29 Dec 2019 13:29:08 -0800 Subject: 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 --- tests/testgitstorage.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tests') 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 #include @@ -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() -- cgit v1.2.3-70-g09d2