From d08bb49c345839ca6e3986eea7d954b51719c7e9 Mon Sep 17 00:00:00 2001 From: "Thiago Marcos P. Santos" Date: Sat, 4 Jan 2020 02:10:21 +0200 Subject: [core] Make it possible to reopen the database read-only for testing Needed for Android, because the database is in readonly filesystem and also because it is annoying to see files modified every time we run the tests. --- render-test/file_source.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'render-test') diff --git a/render-test/file_source.cpp b/render-test/file_source.cpp index 04ebf43b1b..4d6a800d1c 100644 --- a/render-test/file_source.cpp +++ b/render-test/file_source.cpp @@ -66,8 +66,14 @@ std::unique_ptr ProxyFileSource::request(const Resource& resource, std::shared_ptr FileSource::createPlatformFileSource(const ResourceOptions& options) { auto fileSource = std::make_shared(options.cachePath(), options.assetPath()); + fileSource->setAccessToken(options.accessToken()); fileSource->setAPIBaseURL(options.baseURL()); + + if (offline) { + fileSource->reopenDatabaseReadOnlyForTesting(); + } + return fileSource; } -- cgit v1.2.1