[core] expose an option to change the db file path in runtime
This commit is contained in:
committed by
Łukasz Paczos
parent
5e58a0d81d
commit
3f7b70fdb0
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user