Skip to content
This repository has been archived by the owner on Oct 19, 2024. It is now read-only.

Commit

Permalink
test: simplify test cleanup (#2220)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattsse authored Mar 5, 2023
1 parent 86a9e7c commit a4f1a7b
Showing 1 changed file with 0 additions and 24 deletions.
24 changes: 0 additions & 24 deletions ethers-core/src/utils/geth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -572,10 +572,6 @@ mod tests {
// p2p port.
let geth = Geth::new().disable_discovery().data_dir(temp_dir_path).spawn();
let p2p_port = geth.p2p_port();

drop(geth);
temp_dir.close().unwrap();

assert!(p2p_port.is_some());
}

Expand All @@ -587,10 +583,6 @@ mod tests {
// if a p2p port is explicitly set, it should be used
let geth = Geth::new().p2p_port(1234).data_dir(temp_dir_path).spawn();
let p2p_port = geth.p2p_port();

drop(geth);
temp_dir.close().unwrap();

assert_eq!(p2p_port, Some(1234));
}

Expand All @@ -602,10 +594,6 @@ mod tests {
// dev mode should not have a p2p port, and dev should be the default
let geth = Geth::new().data_dir(temp_dir_path).spawn();
let p2p_port = geth.p2p_port();

drop(geth);
temp_dir.close().unwrap();

assert!(p2p_port.is_none());
}

Expand All @@ -622,10 +610,6 @@ mod tests {
.spawn();

let clique_private_key = geth.clique_private_key().clone();

drop(geth);
temp_dir.close().unwrap();

assert!(clique_private_key.is_some());
}

Expand All @@ -642,10 +626,6 @@ mod tests {
.spawn();

let genesis = geth.genesis().clone();

drop(geth);
temp_dir.close().unwrap();

assert!(genesis.is_some());
}

Expand All @@ -662,10 +642,6 @@ mod tests {
.spawn();

let p2p_port = geth.p2p_port();

drop(geth);
temp_dir.close().unwrap();

assert!(p2p_port.is_some());
}
}

0 comments on commit a4f1a7b

Please sign in to comment.