From 85fd62917a3a40d476d9c5b3055cf0dda8615e78 Mon Sep 17 00:00:00 2001 From: arkpar Date: Mon, 12 Dec 2016 17:53:17 +0100 Subject: [PATCH] Updated tests --- parity/cli/mod.rs | 2 +- parity/configuration.rs | 11 +++++++++-- parity/dir.rs | 8 ++++---- 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/parity/cli/mod.rs b/parity/cli/mod.rs index aa1e939f5..6ea9c3fc3 100644 --- a/parity/cli/mod.rs +++ b/parity/cli/mod.rs @@ -669,7 +669,7 @@ mod tests { // -- Miscellaneous Options flag_version: false, - flag_config: "$HOME/.parity/config.toml".into(), + flag_config: "$DATA/config.toml".into(), flag_logging: Some("own_tx=trace".into()), flag_log_file: Some("/var/log/parity.log".into()), flag_no_color: false, diff --git a/parity/configuration.rs b/parity/configuration.rs index 04f8d527b..0190de939 100644 --- a/parity/configuration.rs +++ b/parity/configuration.rs @@ -744,7 +744,8 @@ mod tests { use signer::{Configuration as SignerConfiguration}; use blockchain::{BlockchainCmd, ImportBlockchain, ExportBlockchain, DataFormat, ExportState}; use presale::ImportWallet; - use account::{AccountCmd, NewAccount, ImportAccounts}; + use params::SpecType; + use account::{AccountCmd, NewAccount, ImportAccounts, ListAccounts}; use devtools::{RandomTempPath}; use std::io::Write; use std::fs::{File, create_dir}; @@ -773,6 +774,7 @@ mod tests { iterations: 10240, path: replace_home("", "$HOME/.parity/keys"), password_file: None, + spec: SpecType::default(), }))); } @@ -781,7 +783,10 @@ mod tests { let args = vec!["parity", "account", "list"]; let conf = parse(&args); assert_eq!(conf.into_command().unwrap().cmd, Cmd::Account( - AccountCmd::List(replace_home("", "$HOME/.parity/keys")), + AccountCmd::List(ListAccounts { + path: replace_home("", "$HOME/.parity/keys"), + spec: SpecType::default(), + }) )); } @@ -792,6 +797,7 @@ mod tests { assert_eq!(conf.into_command().unwrap().cmd, Cmd::Account(AccountCmd::Import(ImportAccounts { from: vec!["my_dir".into(), "another_dir".into()], to: replace_home("", "$HOME/.parity/keys"), + spec: SpecType::default(), }))); } @@ -804,6 +810,7 @@ mod tests { path: replace_home("", "$HOME/.parity/keys"), wallet_path: "my_wallet.json".into(), password_file: Some("pwd".into()), + spec: SpecType::default(), })); } diff --git a/parity/dir.rs b/parity/dir.rs index c61af3a8c..e0d70fb02 100644 --- a/parity/dir.rs +++ b/parity/dir.rs @@ -196,10 +196,10 @@ mod tests { #[test] fn test_default_directories() { let expected = Directories { - db: replace_home("$HOME/.parity"), - keys: replace_home("$HOME/.parity/keys"), - signer: replace_home("$HOME/.parity/signer"), - dapps: replace_home("$HOME/.parity/dapps"), + data: replace_home("", "$HOME/.parity"), + keys: replace_home("", "$HOME/.parity/keys"), + signer: replace_home("", "$HOME/.parity/signer"), + dapps: replace_home("", "$HOME/.parity/dapps"), }; assert_eq!(expected, Directories::default()); }