diff --git a/tests/node_test_rig/src/lib.rs b/tests/node_test_rig/src/lib.rs index 0c3565a161..2061031edd 100644 --- a/tests/node_test_rig/src/lib.rs +++ b/tests/node_test_rig/src/lib.rs @@ -42,11 +42,15 @@ impl LocalBeaconNode> { /// Returns a `RemoteBeaconNode` that can connect to `self`. Useful for testing the node as if /// it were external this process. pub fn remote_node(&self) -> Result, String> { - Ok(RemoteBeaconNode::new( - self.client - .http_listen_addr() - .ok_or_else(|| "A remote beacon node must have a http server".to_string())?, - )?) + let socket_addr = self + .client + .http_listen_addr() + .ok_or_else(|| "A remote beacon node must have a http server".to_string())?; + Ok(RemoteBeaconNode::new(format!( + "http://{}:{}", + socket_addr.ip(), + socket_addr.port() + ))?) } }