moby/libnetwork/portallocator
Cory Snider c2a087a9f7 libnet/d/bridge: use fresh PortAllocator in tests
portallocator.PortAllocator holds persistent state on port allocations
in the network namespace. It normal operation it is used as a singleton,
which is a problem in unit tests as every test runs in a clean network
namespace. The singleton "default" PortAllocator remembers all the port
allocations made in other tests---in other network namespaces---and
can result in spurious test failures. Refactor the bridge driver so that
tests can construct driver instances with unique PortAllocators.

Signed-off-by: Cory Snider <csnider@mirantis.com>
2022-11-08 17:58:06 -05:00
..
portallocator.go libnet/d/bridge: use fresh PortAllocator in tests 2022-11-08 17:58:06 -05:00
portallocator_freebsd.go portallocator: log instead of discard port-range failures 2021-06-10 10:52:59 +02:00
portallocator_linux.go portallocator: log instead of discard port-range failures 2021-06-10 10:52:59 +02:00
portallocator_test.go libnet/d/bridge: use fresh PortAllocator in tests 2022-11-08 17:58:06 -05:00
portallocator_unix.go libnetwork/portallocator: un-export consts for defaults 2022-06-02 22:59:32 +02:00
portallocator_windows.go libnetwork/portallocator: un-export consts for defaults 2022-06-02 22:59:32 +02:00