src/backup/datastore.rs: new method open_with_path

To make testing easier.
This commit is contained in:
Dietmar Maurer 2020-09-19 09:55:21 +02:00
parent 0a15870a82
commit fce4659388

View File

@ -70,6 +70,10 @@ impl DataStore {
let path = store_config["path"].as_str().unwrap();
Self::open_with_path(store_name, path)
}
pub fn open_with_path(store_name: &str, path: &str) -> Result<Self, Error> {
let chunk_store = ChunkStore::open(store_name, path)?;
let gc_status = GarbageCollectionStatus::default();