mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-01-29 09:08:05 -05:00
chore: fix broken test from #2575
Thx @leovct: https://github.com/paradigmxyz/reth/pull/2575#issuecomment-1536726997
This commit is contained in:
@@ -798,14 +798,14 @@ mod tests {
|
||||
|
||||
#[test]
|
||||
fn parse_db_path() {
|
||||
let cmd = Command::try_parse_from(["reth", "--db", "my/path/to/db"]).unwrap();
|
||||
let data_dir = cmd.datadir.unwrap_or_chain_default(cmd.chain.chain);
|
||||
let db_path = data_dir.db_path();
|
||||
assert_eq!(db_path, Path::new("my/path/to/db"));
|
||||
|
||||
let cmd = Command::try_parse_from(["reth"]).unwrap();
|
||||
let data_dir = cmd.datadir.unwrap_or_chain_default(cmd.chain.chain);
|
||||
let db_path = data_dir.db_path();
|
||||
assert!(db_path.ends_with("reth/mainnet/db"), "{:?}", cmd.config);
|
||||
|
||||
let cmd = Command::try_parse_from(["reth", "--datadir", "my/custom/path"]).unwrap();
|
||||
let data_dir = cmd.datadir.unwrap_or_chain_default(cmd.chain.chain);
|
||||
let db_path = data_dir.db_path();
|
||||
assert_eq!(db_path, Path::new("my/custom/path/db"));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user