mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-16 20:39:10 +00:00
Shifts tests to use random ports (#998)
This commit is contained in:
@@ -114,12 +114,14 @@ fn test_secio_noise_fallback() {
|
||||
|
||||
let log = common::build_log(log_level, enable_logging);
|
||||
|
||||
let noisy_config = common::build_config(56010, vec![], None);
|
||||
let port = common::unused_port("tcp").unwrap();
|
||||
let noisy_config = common::build_config(port, vec![], None);
|
||||
let mut noisy_node = Service::new(&noisy_config, log.clone())
|
||||
.expect("should build a libp2p instance")
|
||||
.1;
|
||||
|
||||
let secio_config = common::build_config(56011, vec![common::get_enr(&noisy_node)], None);
|
||||
let port = common::unused_port("tcp").unwrap();
|
||||
let secio_config = common::build_config(port, vec![common::get_enr(&noisy_node)], None);
|
||||
|
||||
// Building a custom Libp2pService from outside the crate isn't possible because of
|
||||
// private fields in the Libp2pService struct. A swarm is good enough for testing
|
||||
|
||||
Reference in New Issue
Block a user