Fixing tests
This commit is contained in:
parent
d046a7d5d4
commit
27d30fca22
@ -578,6 +578,7 @@ mod tests {
|
||||
flag_logging: Some("own_tx=trace".into()),
|
||||
flag_log_file: Some("/var/log/parity.log".into()),
|
||||
flag_no_color: false,
|
||||
flag_no_config: false,
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -652,14 +652,14 @@ mod tests {
|
||||
#[test]
|
||||
fn test_command_version() {
|
||||
let args = vec!["parity", "--version"];
|
||||
let conf = Configuration::parse(&args).unwrap();
|
||||
let conf = parse(&args);
|
||||
assert_eq!(conf.into_command().unwrap(), Cmd::Version);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_command_account_new() {
|
||||
let args = vec!["parity", "account", "new"];
|
||||
let conf = Configuration::parse(&args).unwrap();
|
||||
let conf = parse(&args);
|
||||
assert_eq!(conf.into_command().unwrap(), Cmd::Account(AccountCmd::New(NewAccount {
|
||||
iterations: 10240,
|
||||
path: replace_home("$HOME/.parity/keys"),
|
||||
@ -670,7 +670,7 @@ mod tests {
|
||||
#[test]
|
||||
fn test_command_account_list() {
|
||||
let args = vec!["parity", "account", "list"];
|
||||
let conf = Configuration::parse(&args).unwrap();
|
||||
let conf = parse(&args);
|
||||
assert_eq!(conf.into_command().unwrap(), Cmd::Account(
|
||||
AccountCmd::List(replace_home("$HOME/.parity/keys")))
|
||||
);
|
||||
@ -679,7 +679,7 @@ mod tests {
|
||||
#[test]
|
||||
fn test_command_account_import() {
|
||||
let args = vec!["parity", "account", "import", "my_dir", "another_dir"];
|
||||
let conf = Configuration::parse(&args).unwrap();
|
||||
let conf = parse(&args);
|
||||
assert_eq!(conf.into_command().unwrap(), Cmd::Account(AccountCmd::Import(ImportAccounts {
|
||||
from: vec!["my_dir".into(), "another_dir".into()],
|
||||
to: replace_home("$HOME/.parity/keys"),
|
||||
@ -689,7 +689,7 @@ mod tests {
|
||||
#[test]
|
||||
fn test_command_wallet_import() {
|
||||
let args = vec!["parity", "wallet", "import", "my_wallet.json", "--password", "pwd"];
|
||||
let conf = Configuration::parse(&args).unwrap();
|
||||
let conf = parse(&args);
|
||||
assert_eq!(conf.into_command().unwrap(), Cmd::ImportPresaleWallet(ImportWallet {
|
||||
iterations: 10240,
|
||||
path: replace_home("$HOME/.parity/keys"),
|
||||
@ -701,7 +701,7 @@ mod tests {
|
||||
#[test]
|
||||
fn test_command_blockchain_import() {
|
||||
let args = vec!["parity", "import", "blockchain.json"];
|
||||
let conf = Configuration::parse(&args).unwrap();
|
||||
let conf = parse(&args);
|
||||
assert_eq!(conf.into_command().unwrap(), Cmd::Blockchain(BlockchainCmd::Import(ImportBlockchain {
|
||||
spec: Default::default(),
|
||||
logger_config: Default::default(),
|
||||
@ -721,7 +721,7 @@ mod tests {
|
||||
#[test]
|
||||
fn test_command_blockchain_export() {
|
||||
let args = vec!["parity", "export", "blockchain.json"];
|
||||
let conf = Configuration::parse(&args).unwrap();
|
||||
let conf = parse(&args);
|
||||
assert_eq!(conf.into_command().unwrap(), Cmd::Blockchain(BlockchainCmd::Export(ExportBlockchain {
|
||||
spec: Default::default(),
|
||||
logger_config: Default::default(),
|
||||
@ -742,7 +742,7 @@ mod tests {
|
||||
#[test]
|
||||
fn test_command_blockchain_export_with_custom_format() {
|
||||
let args = vec!["parity", "export", "--format", "hex", "blockchain.json"];
|
||||
let conf = Configuration::parse(&args).unwrap();
|
||||
let conf = parse(&args);
|
||||
assert_eq!(conf.into_command().unwrap(), Cmd::Blockchain(BlockchainCmd::Export(ExportBlockchain {
|
||||
spec: Default::default(),
|
||||
logger_config: Default::default(),
|
||||
@ -763,7 +763,7 @@ mod tests {
|
||||
#[test]
|
||||
fn test_command_signer_new_token() {
|
||||
let args = vec!["parity", "signer", "new-token"];
|
||||
let conf = Configuration::parse(&args).unwrap();
|
||||
let conf = parse(&args);
|
||||
let expected = replace_home("$HOME/.parity/signer");
|
||||
assert_eq!(conf.into_command().unwrap(), Cmd::SignerToken(expected));
|
||||
}
|
||||
@ -771,7 +771,7 @@ mod tests {
|
||||
#[test]
|
||||
fn test_run_cmd() {
|
||||
let args = vec!["parity"];
|
||||
let conf = Configuration::parse(&args).unwrap();
|
||||
let conf = parse(&args);
|
||||
assert_eq!(conf.into_command().unwrap(), Cmd::Run(RunCmd {
|
||||
cache_config: Default::default(),
|
||||
dirs: Default::default(),
|
||||
|
Loading…
Reference in New Issue
Block a user