test: set --authrpc.port to 0 for Geth instance (#3476)

This commit is contained in:
Matthias Seitz
2023-06-29 21:30:15 +02:00
committed by GitHub
parent dcae84a2b1
commit 0ec32255e9

View File

@ -318,7 +318,7 @@ async fn test_incoming_node_id_blacklist() {
// instantiate geth and add ourselves as a peer
let temp_dir = tempfile::tempdir().unwrap().into_path();
let geth = Geth::new().data_dir(temp_dir).disable_discovery().spawn();
let geth = Geth::new().data_dir(temp_dir).disable_discovery().authrpc_port(0).spawn();
let geth_endpoint = SocketAddr::new([127, 0, 0, 1].into(), geth.port());
let provider = Provider::<Http>::try_from(format!("http://{geth_endpoint}")).unwrap();
@ -371,7 +371,7 @@ async fn test_incoming_connect_with_single_geth() {
// instantiate geth and add ourselves as a peer
let temp_dir = tempfile::tempdir().unwrap().into_path();
let geth = Geth::new().data_dir(temp_dir).disable_discovery().spawn();
let geth = Geth::new().data_dir(temp_dir).disable_discovery().authrpc_port(0).spawn();
let geth_endpoint = SocketAddr::new([127, 0, 0, 1].into(), geth.port());
let provider = Provider::<Http>::try_from(format!("http://{geth_endpoint}")).unwrap();
@ -429,7 +429,7 @@ async fn test_outgoing_connect_with_single_geth() {
// instantiate geth and add ourselves as a peer
let temp_dir = tempfile::tempdir().unwrap().into_path();
let geth = Geth::new().disable_discovery().data_dir(temp_dir).spawn();
let geth = Geth::new().disable_discovery().data_dir(temp_dir).authrpc_port(0).spawn();
let geth_p2p_port = geth.p2p_port().unwrap();
let geth_socket = SocketAddr::new([127, 0, 0, 1].into(), geth_p2p_port);
@ -474,7 +474,7 @@ async fn test_geth_disconnect() {
// instantiate geth and add ourselves as a peer
let temp_dir = tempfile::tempdir().unwrap().into_path();
let geth = Geth::new().disable_discovery().data_dir(temp_dir).spawn();
let geth = Geth::new().disable_discovery().data_dir(temp_dir).authrpc_port(0).spawn();
let geth_p2p_port = geth.p2p_port().unwrap();
let geth_socket = SocketAddr::new([127, 0, 0, 1].into(), geth_p2p_port);