diff options
author | Łukasz Paczos <lukas.paczos@gmail.com> | 2019-02-19 13:22:24 +0100 |
---|---|---|
committer | Łukasz Paczos <lukasz.paczos@mapbox.com> | 2019-03-13 18:28:04 +0100 |
commit | 3f7b70fdb0e40d0cbbaea17505878c72491e3cd2 (patch) | |
tree | dbbc7be080142263797bafbff5c4b950c615dc90 /test | |
parent | 5e58a0d81d702a543e898b489ead044a630229a0 (diff) | |
download | qtlocation-mapboxgl-3f7b70fdb0e40d0cbbaea17505878c72491e3cd2.tar.gz |
[core] expose an option to change the db file path in runtime
Diffstat (limited to 'test')
-rw-r--r-- | test/storage/offline_database.test.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/storage/offline_database.test.cpp b/test/storage/offline_database.test.cpp index d6405fd452..744803a4b2 100644 --- a/test/storage/offline_database.test.cpp +++ b/test/storage/offline_database.test.cpp @@ -1352,3 +1352,11 @@ TEST(OfflineDatabase, TEST_REQUIRES_WRITE(MergeDatabaseWithDiskFull)) { } #endif // __QT__ +TEST(OfflineDatabse, ChangePath) { + std::string newPath("test/fixtures/offline_database/test.db"); + OfflineDatabase db(":memory:"); + db.changePath(newPath); + mapbox::sqlite::Database::open(newPath, mapbox::sqlite::ReadOnly); + util::deleteFile(newPath); +} + |