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>
This commit is contained in:
Dirk Hohndel 2019-12-29 13:29:08 -08:00
parent 7641a6263f
commit a85b0896b4

View file

@ -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()