Fix tests.

This commit is contained in:
Gav Wood 2016-12-11 15:41:49 +01:00
parent 5bf9fa9168
commit 0e17cf8d3a
No known key found for this signature in database
GPG Key ID: C49C1ACA1CC9B252
3 changed files with 8 additions and 3 deletions

View File

@ -65,7 +65,7 @@ fn init_logger() {
if let Ok(log) = env::var("RUST_LOG") {
let mut builder = LogBuilder::new();
builder.parse(&log);
builder.init().expect("Logger is initialized only once.");
let _ = builder.init(); // ignore errors since ./test.sh will call this multiple times.
}
}

View File

@ -2,6 +2,10 @@
mode = "last"
mode_timeout = 300
mode_alarm = 3600
auto_update = "critical"
no_download = false
no_consensus = false
chain = "homestead"
db_path = "$HOME/.parity"
keys_path = "$HOME/.parity/keys"

View File

@ -746,7 +746,7 @@ mod tests {
use super::*;
use cli::Args;
use ethcore_rpc::NetworkSettings;
use ethcore::client::{VMType, BlockId, UpdatePolicy, UpdateFilter};
use ethcore::client::{VMType, BlockId};
use ethcore::miner::{MinerOptions, PrioritizationStrategy};
use helpers::{replace_home, default_network_config};
use run::RunCmd;
@ -755,6 +755,7 @@ mod tests {
use presale::ImportWallet;
use account::{AccountCmd, NewAccount, ImportAccounts};
use devtools::{RandomTempPath};
use updater::{UpdatePolicy, UpdateFilter};
use std::io::Write;
use std::fs::{File, create_dir};
@ -942,7 +943,7 @@ mod tests {
acc_conf: Default::default(),
gas_pricer: Default::default(),
miner_extras: Default::default(),
update_policy: Default::default(),
update_policy: UpdatePolicy { enable_downloading: true, filter: UpdateFilter::Critical },
mode: Default::default(),
tracing: Default::default(),
compaction: Default::default(),