client test creating
This commit is contained in:
parent
95e96a653f
commit
800154a8ae
20
src/tests/client.rs
Normal file
20
src/tests/client.rs
Normal file
@ -0,0 +1,20 @@
|
||||
use ethereum;
|
||||
use client::{BlockChainClient,Client};
|
||||
use std::env;
|
||||
use pod_state::*;
|
||||
|
||||
|
||||
#[test]
|
||||
fn test_client_is_created() {
|
||||
|
||||
let mut spec = ethereum::new_frontier_like_test();
|
||||
spec.set_genesis_state(PodState::from_json(test.find("pre").unwrap()));
|
||||
spec.overwrite_genesis(test.find("genesisBlockHeader").unwrap());
|
||||
|
||||
let mut dir = env::temp_dir();
|
||||
dir.push(H32::random().hex());
|
||||
|
||||
let client_result = Client::new(spec, &dir, IOChannel::disconnected());
|
||||
|
||||
assert!(client_result.is_ok());
|
||||
}
|
@ -4,3 +4,4 @@ mod test_common;
|
||||
mod transaction;
|
||||
mod executive;
|
||||
mod state;
|
||||
mod client;
|
Loading…
Reference in New Issue
Block a user