fix(test): only listen on 127.0.0.1 for ephemeral swarm

This resolves an issue where our tests were depending on the number of network interfaces available on the local machine.

Related #4110.

Pull-Request: #4122.


  
Co-Authored-By: Thomas Eizinger <thomas@eizinger.io>
This commit is contained in:
Thomas Eizinger
2023-06-27 03:21:47 +02:00
committed by GitHub
parent e32775d6fb
commit d5475fccde
5 changed files with 32 additions and 6 deletions

View File

@ -312,7 +312,7 @@ where
self.add_external_address(memory_multiaddr.clone());
let tcp_addr_listener_id = self
.listen_on("/ip4/0.0.0.0/tcp/0".parse().unwrap())
.listen_on("/ip4/127.0.0.1/tcp/0".parse().unwrap())
.unwrap();
let tcp_multiaddr = self