Fix tests.

This commit is contained in:
Gav 2017-03-02 15:43:11 +01:00
parent bb3b2311bf
commit 90562c1331

View File

@ -821,7 +821,7 @@ impl Configuration {
let ui_path = replace_home(&data_path, &self.args.flag_ui_path); let ui_path = replace_home(&data_path, &self.args.flag_ui_path);
if self.args.flag_geth && !cfg!(windows) { if self.args.flag_geth && !cfg!(windows) {
let geth_root = if self.args.flag_testnet { path::ethereum::test() } else { path::ethereum::default() }; let geth_root = if self.chain() == 'testnet'.to_owned() { path::ethereum::test() } else { path::ethereum::default() };
::std::fs::create_dir_all(geth_root.as_path()).unwrap_or_else( ::std::fs::create_dir_all(geth_root.as_path()).unwrap_or_else(
|e| warn!("Failed to create '{}' for geth mode: {}", &geth_root.to_str().unwrap(), e)); |e| warn!("Failed to create '{}' for geth mode: {}", &geth_root.to_str().unwrap(), e));
} }
@ -1223,7 +1223,7 @@ mod tests {
// then // then
assert_eq!(conf.network_settings(), NetworkSettings { assert_eq!(conf.network_settings(), NetworkSettings {
name: "testname".to_owned(), name: "testname".to_owned(),
chain: "ropsten".to_owned(), chain: "kovan".to_owned(),
network_port: 30303, network_port: 30303,
rpc_enabled: true, rpc_enabled: true,
rpc_interface: "local".to_owned(), rpc_interface: "local".to_owned(),