From aac0260d21f1dc85a58be2442e00ed50b07dceea Mon Sep 17 00:00:00 2001 From: Rob Murray Date: Fri, 13 Jun 2025 10:53:22 +0100 Subject: [PATCH] Fix flaky test TestDaemonRestartRestoreBridgeNetwork It checked for "Bind for 0.0.0.0:80 failed: port is already allocated". But, since commit d662091 ("portallocator: always check for ports allocated for 0.0.0.0/::"), the message is sometimes about ":::80". Signed-off-by: Rob Murray --- integration-cli/docker_cli_network_unix_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/integration-cli/docker_cli_network_unix_test.go b/integration-cli/docker_cli_network_unix_test.go index 356df06aa1..d113bab88c 100644 --- a/integration-cli/docker_cli_network_unix_test.go +++ b/integration-cli/docker_cli_network_unix_test.go @@ -1691,8 +1691,8 @@ func (s *DockerDaemonSuite) TestDaemonRestartRestoreBridgeNetwork(t *testing.T) // start a new container, trying to publish port 80:80 should fail out, err := s.d.Cmd("run", "-p", "80:80", "-d", "busybox", "top") - if err == nil || !strings.Contains(out, "Bind for 0.0.0.0:80 failed: port is already allocated") { - t.Fatalf("80 port is allocated to old running container, it should failed on allocating to new container") + if err == nil || !strings.Contains(out, "port is already allocated") { + t.Fatalf("Expected 'port is already allocated', got err:%v out:%s", err, out) } // kill old running container and try to allocate again