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