moby--moby/libnetwork/drivers
Albin Kerouanton c721bad8cc
Fix flaky TestPortMappingV6Config
Since moby/libnetwork#2635 has been merged, allocatePortsInternal()
checks if IPv6 is enabled by calling IsV6Listenable(). This function
calls `net.Listen("tcp6", "[::1]:0")` and returns false when
net.Listen() fails.

TestPortMappingV6Config() starts by setting up a new net ns to run into
it. The loopback interface is not bring up in this net ns, thus
net.Listen() fails and IsV6Listenable() returns false. This change takes
care of bringing loopback iface up right after moving to the new net ns.

This test has been reported has flaky on s390x in #42468. For some
reason, this test seems to be consistently green on the CI (on amd64
arch) and when running `hack/test/unit` locally. However it consistently
fails when running `TESTFLAGS='-shuffle on' hack/test/unit` locally.

Signed-off-by: Albin Kerouanton <albinker@gmail.com>
2021-11-16 09:37:34 +01:00
..
bridge Fix flaky TestPortMappingV6Config 2021-11-16 09:37:34 +01:00
host libnetwork: remove unused "testutils" imports 2021-08-18 14:20:37 +02:00
ipvlan Update to Go 1.17.0, and gofmt with Go 1.17 2021-08-24 23:33:27 +02:00
macvlan Update to Go 1.17.0, and gofmt with Go 1.17 2021-08-24 23:33:27 +02:00
null libnetwork: remove unused "testutils" imports 2021-08-18 14:20:37 +02:00
overlay refactor: move from io/ioutil to io and os package 2021-08-27 14:56:57 +08:00
remote refactor: move from io/ioutil to io and os package 2021-08-27 14:56:57 +08:00
windows Update to Go 1.17.0, and gofmt with Go 1.17 2021-08-24 23:33:27 +02:00