mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-31 20:23:25 +00:00
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:
parent
7641a6263f
commit
a85b0896b4
1 changed files with 4 additions and 0 deletions
|
@ -9,6 +9,7 @@
|
||||||
#include "core/settings/qPrefProxy.h"
|
#include "core/settings/qPrefProxy.h"
|
||||||
#include "core/settings/qPrefCloudStorage.h"
|
#include "core/settings/qPrefCloudStorage.h"
|
||||||
#include "core/trip.h"
|
#include "core/trip.h"
|
||||||
|
#include "core/git-access.h"
|
||||||
|
|
||||||
#include <QDir>
|
#include <QDir>
|
||||||
#include <QTextStream>
|
#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"));
|
QString localCacheDir(get_local_dir("https://cloud.subsurface-divelog.org/git/ssrftest@hohndel.org", "ssrftest@hohndel.org"));
|
||||||
QDir localCacheDirectory(localCacheDir);
|
QDir localCacheDirectory(localCacheDir);
|
||||||
QCOMPARE(localCacheDirectory.removeRecursively(), true);
|
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()
|
void TestGitStorage::cleanup()
|
||||||
|
|
Loading…
Add table
Reference in a new issue