From 0ec32255e90e2b420db8992210b14c06315647e4 Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Thu, 29 Jun 2023 21:30:15 +0200 Subject: [PATCH] test: set --authrpc.port to 0 for Geth instance (#3476) --- crates/net/network/tests/it/connect.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/crates/net/network/tests/it/connect.rs b/crates/net/network/tests/it/connect.rs index e495980535..11ceb5f8a8 100644 --- a/crates/net/network/tests/it/connect.rs +++ b/crates/net/network/tests/it/connect.rs @@ -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::::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::::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);