Skip to content

Commit

Permalink
fix: construct StorageConfig directly in unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
J0HN50N133 committed Apr 11, 2024
1 parent 83ce6ca commit 39189b0
Showing 1 changed file with 7 additions and 12 deletions.
19 changes: 7 additions & 12 deletions src/roxy/src/storage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -281,18 +281,13 @@ pub fn setup_test_storage_for_ut() -> Storage {
.to_str()
.unwrap()
.to_string();
let storage_config: StorageConfig = toml::from_str(
format!(
r#"
path = "{}"
secondary_path = "{}"
rocksdb = {{ block_size = 4096 }}
"#,
dbpath, secondary_path
)
.as_str(),
)
.unwrap();
let storage_config = StorageConfig {
dbpath,
secondary_path,
_open_mode: OpenMode::Default,
_backup_path: None,
rocksdb: RocksDBConfig { block_size: 4096 },
};
let mut storage = Storage::try_new(storage_config).unwrap();
storage.open(OpenMode::Default).unwrap();
storage
Expand Down

0 comments on commit 39189b0

Please sign in to comment.