diff --git a/data/containers/patches.yaml b/data/containers/patches.yaml index c8f767e22bcd..fe4a513a6e07 100644 --- a/data/containers/patches.yaml +++ b/data/containers/patches.yaml @@ -71,6 +71,7 @@ docker-py: # https://github.com/docker/docker-py/pull/3373 - test_create_with_ipv6_address: enable IPv6 # https://github.com/docker/docker-py/pull/3380 - integration: Remove test_build_squash tests # https://github.com/docker/docker-py/pull/3393 - tests: Make stream assertions robust to chunk splitting + # https://github.com/docker/docker-py/pull/3394 - Fix test_connect_with_mac_address for Docker v29.3 3261: 3290: 3354: @@ -81,6 +82,7 @@ docker-py: 3373: 3380: 3393: + 3394: moby: # https://github.com/moby/moby/pull/51219 - integration/container: Make tests runnable on SELinux enabled daemon diff --git a/data/containers/patches/docker-py/3394.patch b/data/containers/patches/docker-py/3394.patch new file mode 100644 index 000000000000..11f306312ad7 --- /dev/null +++ b/data/containers/patches/docker-py/3394.patch @@ -0,0 +1,34 @@ +From c4faae3037223ce77236ad8bcf03b095bc18a18f Mon Sep 17 00:00:00 2001 +From: Ricardo Branco +Date: Thu, 2 Apr 2026 00:11:25 +0200 +Subject: [PATCH] Fix test_connect_with_mac_address for Docker v29.3 + +With (moby/moby#52040), Docker v29.3.0 now correctly applies the +MacAddress field in EndpointSettings when connecting a container +to a network. + +The test connected a stopped container to immediately inspect it. + +Start the container before connecting to the network so the MAC +is correctly applied and reflected in inspect on both old and new +Docker versions. + +Fixes: https://github.com/docker/docker-py/issues/3389 + +Signed-off-by: Ricardo Branco +--- + tests/integration/api_network_test.py | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/tests/integration/api_network_test.py b/tests/integration/api_network_test.py +index 070282d24..16f39f84c 100644 +--- a/tests/integration/api_network_test.py ++++ b/tests/integration/api_network_test.py +@@ -415,6 +415,7 @@ def test_connect_with_mac_address(self): + + container = self.client.create_container(TEST_IMG, 'top') + self.tmp_containers.append(container) ++ self.client.start(container) + + self.client.connect_container_to_network( + container, net_name, mac_address='02:42:ac:11:00:02' diff --git a/tests/containers/python_docker.pm b/tests/containers/python_docker.pm index 45ffff7d3691..213261f8f056 100644 --- a/tests/containers/python_docker.pm +++ b/tests/containers/python_docker.pm @@ -82,8 +82,6 @@ sub test ($target) { "tests.integration.api_container_test.AttachContainerTest::test_attach_no_stream", # This test with websockets is broken "tests.integration.api_container_test.AttachContainerTest::test_run_container_reading_socket_ws", - # https://github.com/docker/docker-py/issues/3389 - "tests.integration.api_network_test.TestNetworks::test_connect_with_mac_address", ); push @xfails, ( "tests.unit.api_build_test.BuildTest::test_set_auth_headers_with_dict_and_no_auth_configs",