test: use port0 in tests (#12154)

This commit is contained in:
Matthias Seitz
2024-10-29 01:04:24 +01:00
committed by GitHub
parent 0297b8f694
commit fbe04625b9

View File

@@ -113,6 +113,7 @@ async fn test_node_record_address_with_nat() {
.add_nat(Some(NatResolver::ExternalIp("10.1.1.1".parse().unwrap())))
.disable_discv4_discovery()
.disable_dns_discovery()
.listener_port(0)
.build_with_noop_provider(MAINNET.clone());
let network = NetworkManager::new(config).await.unwrap();
@@ -127,6 +128,7 @@ async fn test_node_record_address_with_nat_disable_discovery() {
let config = NetworkConfigBuilder::new(secret_key)
.add_nat(Some(NatResolver::ExternalIp("10.1.1.1".parse().unwrap())))
.disable_discovery()
.listener_port(0)
.build_with_noop_provider(MAINNET.clone());
let network = NetworkManager::new(config).await.unwrap();