diff --git a/data/containers/patches.yaml b/data/containers/patches.yaml index b5c29a2eecac..c187246fcd03 100644 --- a/data/containers/patches.yaml +++ b/data/containers/patches.yaml @@ -82,7 +82,10 @@ buildx: compose: # Note on patches: # https://github.com/docker/compose/pull/13214 - test: Set stop_signal to SIGTERM + # https://github.com/docker/compose/pull/13564 - test: fix pull failure assertion for Docker v29 opensuse-Tumbleweed: + GITHUB_PATCHES: + - 13564 sle-16.1: GITHUB_PATCHES: - 13214 @@ -109,16 +112,26 @@ conmon: - 579 docker-py: # Note on patches: + # https://github.com/docker/docker-py/pull/3261 - Bump default API version to 1.45 (Moby 26.0/26.1) # https://github.com/docker/docker-py/pull/3290 - tests/exec: expect 127 exit code for missing executable # https://github.com/docker/docker-py/pull/3354 - tests: Fix deprecation warning for utcfromtimestamp() + # https://github.com/docker/docker-py/pull/3362 - test/integration: don't check for deprecated Networks field # https://github.com/docker/docker-py/pull/3366 - test: Skip from_env_unix tests if DOCKER_HOST is network socket # https://github.com/docker/docker-py/pull/3367 - tests/integration: Make the tests runnable on SELinux enabled daemon + # https://github.com/docker/docker-py/pull/3372 - test_connect_with_ipv6_address: enable IPv6 + # 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 opensuse-Tumbleweed: GITHUB_PATCHES: + - 3261 - 3290 - 3354 + - 3362 - 3366 - 3367 + - 3372 + - 3373 + - 3380 sle-16.1: GITHUB_PATCHES: - 3290 @@ -136,11 +149,12 @@ moby: # https://github.com/moby/moby/pull/51219 - integration/container: Make tests runnable on SELinux enabled daemon # https://github.com/moby/moby/pull/51263 - integration: Skip some tests as rootless # https://github.com/moby/moby/pull/51794 - integration: Support iputils ping + # https://github.com/moby/moby/pull/51970 - Skip some tests as rootless when SELinux is enabled opensuse-Tumbleweed: GITHUB_PATCHES: - - 51219 - 51263 - 51794 + - 51970 sle-16.1: GITHUB_PATCHES: - 51219 diff --git a/data/containers/patches/compose/13564.patch b/data/containers/patches/compose/13564.patch new file mode 100644 index 000000000000..61e847d12524 --- /dev/null +++ b/data/containers/patches/compose/13564.patch @@ -0,0 +1,33 @@ +From eadc20444aac50267019021d8d554a9ce34692f6 Mon Sep 17 00:00:00 2001 +From: Ricardo Branco +Date: Fri, 30 Jan 2026 19:11:06 +0100 +Subject: [PATCH] test: fix pull failure assertion for Docker v29 + +The error message comes now from containerd. + +Signed-off-by: Ricardo Branco +--- + pkg/e2e/pull_test.go | 10 +++++++++- + 1 file changed, 9 insertions(+), 1 deletion(-) + +diff --git a/pkg/e2e/pull_test.go b/pkg/e2e/pull_test.go +index 799bdbb2fc7..61550e4ca12 100644 +--- a/pkg/e2e/pull_test.go ++++ b/pkg/e2e/pull_test.go +@@ -66,7 +66,15 @@ func TestComposePull(t *testing.T) { + + t.Run("Verify pull failure", func(t *testing.T) { + res := c.RunDockerComposeCmdNoCheck(t, "--project-directory", "fixtures/compose-pull/unknown-image", "pull") +- res.Assert(t, icmd.Expected{ExitCode: 1, Err: "pull access denied for does_not_exists"}) ++ output := res.Combined() ++ ++ errMsg := "pull access denied for does_not_exists" ++ if !strings.Contains(output, errMsg) { ++ // containerd returns: ++ // failed to resolve reference "docker.io/library/does_not_exists:latest": docker.io/library/does_not_exists:latest: not found ++ errMsg = "does_not_exists:latest: not found" ++ } ++ res.Assert(t, icmd.Expected{ExitCode: 1, Err: errMsg}) + }) + + t.Run("Verify ignore pull failure", func(t *testing.T) { diff --git a/data/containers/patches/docker-py/3362.patch b/data/containers/patches/docker-py/3362.patch new file mode 100644 index 000000000000..ca56596db064 --- /dev/null +++ b/data/containers/patches/docker-py/3362.patch @@ -0,0 +1,152 @@ +From b520fb89514ce9e1b8cfd7527485ece588a90f6b Mon Sep 17 00:00:00 2001 +From: Sebastiaan van Stijn +Date: Tue, 14 Oct 2025 18:36:34 +0200 +Subject: [PATCH] test/integration: don't check for deprecated Networks field + +These tests depended on the deprecated Spec.Networks field, which +is no longer part of current API versions, causing the test to +fail; + + =================================== FAILURES =================================== + _____________ ServiceTest.test_create_service_with_custom_networks _____________ + tests/integration/api_service_test.py:379: in test_create_service_with_custom_networks + assert 'Networks' in svc_info['Spec'] + E AssertionError: assert 'Networks' in {'Labels': {}, 'Mode': {'Replicated': {'Replicas': 1}}, 'Name': 'dockerpytest_a538894175d07404', 'TaskTemplate': {'Con...pec': {'Command': ['true'], 'Image': 'alpine:3.10', 'Isolation': 'default'}, 'ForceUpdate': 0, 'Runtime': 'container'}} + ____________ ServiceTest.test_update_service_with_defaults_networks ____________ + tests/integration/api_service_test.py:1128: in test_update_service_with_defaults_networks + assert 'Networks' in svc_info['Spec'] + E AssertionError: assert 'Networks' in {'Labels': {}, 'Mode': {'Replicated': {'Replicas': 1}}, 'Name': 'dockerpytest_6d8e30f359c0f5e', 'TaskTemplate': {'Cont...pec': {'Command': ['true'], 'Image': 'alpine:3.10', 'Isolation': 'default'}, 'ForceUpdate': 0, 'Runtime': 'container'}} + _____________ ServiceTest.test_update_service_with_network_change ______________ + tests/integration/api_service_test.py:1333: in test_update_service_with_network_change + assert 'Networks' in svc_info['Spec'] + E AssertionError: assert 'Networks' in {'Labels': {}, 'Mode': {'Replicated': {'Replicas': 1}}, 'Name': 'dockerpytest_d4e23667cdbaf159', 'TaskTemplate': {'Con... {'Command': ['echo', 'hello'], 'Image': 'busybox', 'Isolation': 'default'}, 'ForceUpdate': 0, 'Runtime': 'container'}} + ------- generated xml file: /src/bundles/test-docker-py/junit-report.xml ------- + =========================== short test summary info ============================ + +Signed-off-by: Sebastiaan van Stijn +--- + tests/integration/api_service_test.py | 56 +++++++++++++++++---------- + 1 file changed, 35 insertions(+), 21 deletions(-) + +diff --git a/tests/integration/api_service_test.py b/tests/integration/api_service_test.py +index d670968786..ba67c6d538 100644 +--- a/tests/integration/api_service_test.py ++++ b/tests/integration/api_service_test.py +@@ -367,16 +367,18 @@ def test_create_service_with_custom_networks(self): + ) + self.tmp_networks.append(net2['Id']) + container_spec = docker.types.ContainerSpec(TEST_IMG, ['true']) +- task_tmpl = docker.types.TaskTemplate(container_spec) +- name = self.get_service_name() +- svc_id = self.client.create_service( +- task_tmpl, name=name, networks=[ ++ task_tmpl = docker.types.TaskTemplate( ++ container_spec, networks=[ + 'dockerpytest_1', {'Target': 'dockerpytest_2'} + ] + ) ++ name = self.get_service_name() ++ svc_id = self.client.create_service( ++ task_tmpl, name=name ++ ) + svc_info = self.client.inspect_service(svc_id) +- assert 'Networks' in svc_info['Spec'] +- assert svc_info['Spec']['Networks'] == [ ++ assert 'Networks' in svc_info['Spec']['TaskTemplate'] ++ assert svc_info['Spec']['TaskTemplate']['Networks'] == [ + {'Target': net1['Id']}, {'Target': net2['Id']} + ] + +@@ -1116,16 +1118,18 @@ def test_update_service_with_defaults_networks(self): + ) + self.tmp_networks.append(net2['Id']) + container_spec = docker.types.ContainerSpec(TEST_IMG, ['true']) +- task_tmpl = docker.types.TaskTemplate(container_spec) +- name = self.get_service_name() +- svc_id = self.client.create_service( +- task_tmpl, name=name, networks=[ ++ task_tmpl = docker.types.TaskTemplate( ++ container_spec, networks=[ + 'dockerpytest_1', {'Target': 'dockerpytest_2'} + ] + ) ++ name = self.get_service_name() ++ svc_id = self.client.create_service( ++ task_tmpl, name=name ++ ) + svc_info = self.client.inspect_service(svc_id) +- assert 'Networks' in svc_info['Spec'] +- assert svc_info['Spec']['Networks'] == [ ++ assert 'Networks' in svc_info['Spec']['TaskTemplate'] ++ assert svc_info['Spec']['TaskTemplate']['Networks'] == [ + {'Target': net1['Id']}, {'Target': net2['Id']} + ] + +@@ -1143,8 +1147,11 @@ def test_update_service_with_defaults_networks(self): + {'Target': net1['Id']}, {'Target': net2['Id']} + ] + ++ task_tmpl = docker.types.TaskTemplate( ++ container_spec, networks=[net1['Id']] ++ ) + self._update_service( +- svc_id, name, new_index, networks=[net1['Id']], ++ svc_id, name, new_index, task_tmpl, + fetch_current_spec=True + ) + svc_info = self.client.inspect_service(svc_id) +@@ -1313,7 +1320,6 @@ def test_update_service_with_network_change(self): + container_spec = docker.types.ContainerSpec( + 'busybox', ['echo', 'hello'] + ) +- task_tmpl = docker.types.TaskTemplate(container_spec) + net1 = self.client.create_network( + self.get_service_name(), driver='overlay', + ipam={'Driver': 'default'} +@@ -1324,22 +1330,27 @@ def test_update_service_with_network_change(self): + ipam={'Driver': 'default'} + ) + self.tmp_networks.append(net2['Id']) ++ task_tmpl = docker.types.TaskTemplate( ++ container_spec, networks=[net1['Id']] ++ ) + name = self.get_service_name() + svc_id = self.client.create_service( +- task_tmpl, name=name, networks=[net1['Id']] ++ task_tmpl, name=name + ) + svc_info = self.client.inspect_service(svc_id) +- assert 'Networks' in svc_info['Spec'] +- assert len(svc_info['Spec']['Networks']) > 0 +- assert svc_info['Spec']['Networks'][0]['Target'] == net1['Id'] ++ assert 'Networks' in svc_info['Spec']['TaskTemplate'] ++ assert len(svc_info['Spec']['TaskTemplate']['Networks']) > 0 ++ assert svc_info['Spec']['TaskTemplate']['Networks'][0]['Target'] == net1['Id'] + + svc_info = self.client.inspect_service(svc_id) + version_index = svc_info['Version']['Index'] + +- task_tmpl = docker.types.TaskTemplate(container_spec) ++ task_tmpl = docker.types.TaskTemplate( ++ container_spec, networks=[net2['Id']] ++ ) + self._update_service( + svc_id, name, version_index, task_tmpl, name=name, +- networks=[net2['Id']], fetch_current_spec=True ++ fetch_current_spec=True + ) + svc_info = self.client.inspect_service(svc_id) + task_template = svc_info['Spec']['TaskTemplate'] +@@ -1351,8 +1362,11 @@ def test_update_service_with_network_change(self): + new_index = svc_info['Version']['Index'] + assert new_index > version_index + ++ task_tmpl = docker.types.TaskTemplate( ++ container_spec, networks=[net1['Id']] ++ ) + self._update_service( +- svc_id, name, new_index, name=name, networks=[net1['Id']], ++ svc_id, name, new_index, task_tmpl, name=name, + fetch_current_spec=True + ) + svc_info = self.client.inspect_service(svc_id) diff --git a/data/containers/patches/docker-py/3372.patch b/data/containers/patches/docker-py/3372.patch new file mode 100644 index 000000000000..0e6eb35516fc --- /dev/null +++ b/data/containers/patches/docker-py/3372.patch @@ -0,0 +1,22 @@ +From 1d882c58113f9d831593ded11d49961cbec1c7ee Mon Sep 17 00:00:00 2001 +From: Rob Murray +Date: Sun, 23 Nov 2025 17:11:08 +0000 +Subject: [PATCH] test_connect_with_ipv6_address: enable IPv6 + +Signed-off-by: Rob Murray +--- + 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 ce2e8ea4c3..908b00b2bc 100644 +--- a/tests/integration/api_network_test.py ++++ b/tests/integration/api_network_test.py +@@ -384,6 +384,7 @@ def test_connect_with_ipv4_address(self): + @requires_api_version('1.22') + def test_connect_with_ipv6_address(self): + net_name, net_id = self.create_network( ++ enable_ipv6=True, + ipam=IPAMConfig( + driver='default', + pool_configs=[ diff --git a/data/containers/patches/docker-py/3373.patch b/data/containers/patches/docker-py/3373.patch new file mode 100644 index 000000000000..db9f0f322dbd --- /dev/null +++ b/data/containers/patches/docker-py/3373.patch @@ -0,0 +1,22 @@ +From ddcd1f717551a30db8c8c0afb4e03814036236d6 Mon Sep 17 00:00:00 2001 +From: Rob Murray +Date: Mon, 24 Nov 2025 11:56:51 +0000 +Subject: [PATCH] test_create_with_ipv6_address: enable IPv6 + +Signed-off-by: Rob Murray +--- + 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 908b00b2b..070282d24 100644 +--- a/tests/integration/api_network_test.py ++++ b/tests/integration/api_network_test.py +@@ -232,6 +232,7 @@ def test_create_with_ipv4_address(self): + @requires_api_version('1.22') + def test_create_with_ipv6_address(self): + net_name, net_id = self.create_network( ++ enable_ipv6=True, + ipam=IPAMConfig( + driver='default', + pool_configs=[IPAMPool(subnet="2001:389::/64")], diff --git a/data/containers/patches/docker-py/3380.patch b/data/containers/patches/docker-py/3380.patch new file mode 100644 index 000000000000..c0f9ee365643 --- /dev/null +++ b/data/containers/patches/docker-py/3380.patch @@ -0,0 +1,192 @@ +From f11a2dfa1588add5209ed6e8ac025ab390a444c0 Mon Sep 17 00:00:00 2001 +From: Ricardo Branco +Date: Fri, 30 Jan 2026 20:17:40 +0100 +Subject: [PATCH 1/3] integration: Remove test_build_squash tests + +The --squash flag is no longer supported with BuildKit. + +Signed-off-by: Ricardo Branco +--- + tests/integration/api_build_test.py | 26 -------------------------- + tests/ssh/api_build_test.py | 26 -------------------------- + 2 files changed, 52 deletions(-) + +diff --git a/tests/integration/api_build_test.py b/tests/integration/api_build_test.py +index 0f560159b3..0507e88420 100644 +--- a/tests/integration/api_build_test.py ++++ b/tests/integration/api_build_test.py +@@ -349,32 +349,6 @@ def test_build_with_extra_hosts(self): + assert '127.0.0.1\textrahost.local.test' in logs + assert '127.0.0.1\thello.world.test' in logs + +- @requires_experimental(until=None) +- @requires_api_version('1.25') +- def test_build_squash(self): +- script = io.BytesIO('\n'.join([ +- 'FROM busybox', +- 'RUN echo blah > /file_1', +- 'RUN echo blahblah > /file_2', +- 'RUN echo blahblahblah > /file_3' +- ]).encode('ascii')) +- +- def build_squashed(squash): +- tag = 'squash' if squash else 'nosquash' +- stream = self.client.build( +- fileobj=script, tag=tag, squash=squash +- ) +- self.tmp_imgs.append(tag) +- for _chunk in stream: +- pass +- +- return self.client.inspect_image(tag) +- +- non_squashed = build_squashed(False) +- squashed = build_squashed(True) +- assert len(non_squashed['RootFS']['Layers']) == 4 +- assert len(squashed['RootFS']['Layers']) == 2 +- + def test_build_stderr_data(self): + control_chars = ['\x1b[91m', '\x1b[0m'] + snippet = 'Ancient Temple (Mystic Oriental Dream ~ Ancient Temple)' +diff --git a/tests/ssh/api_build_test.py b/tests/ssh/api_build_test.py +index f17c75630f..f57f935d6c 100644 +--- a/tests/ssh/api_build_test.py ++++ b/tests/ssh/api_build_test.py +@@ -340,32 +340,6 @@ def test_build_with_extra_hosts(self): + assert '127.0.0.1\textrahost.local.test' in logs + assert '127.0.0.1\thello.world.test' in logs + +- @requires_experimental(until=None) +- @requires_api_version('1.25') +- def test_build_squash(self): +- script = io.BytesIO('\n'.join([ +- 'FROM busybox', +- 'RUN echo blah > /file_1', +- 'RUN echo blahblah > /file_2', +- 'RUN echo blahblahblah > /file_3' +- ]).encode('ascii')) +- +- def build_squashed(squash): +- tag = 'squash' if squash else 'nosquash' +- stream = self.client.build( +- fileobj=script, tag=tag, squash=squash +- ) +- self.tmp_imgs.append(tag) +- for _chunk in stream: +- pass +- +- return self.client.inspect_image(tag) +- +- non_squashed = build_squashed(False) +- squashed = build_squashed(True) +- assert len(non_squashed['RootFS']['Layers']) == 4 +- assert len(squashed['RootFS']['Layers']) == 2 +- + def test_build_stderr_data(self): + control_chars = ['\x1b[91m', '\x1b[0m'] + snippet = 'Ancient Temple (Mystic Oriental Dream ~ Ancient Temple)' + +From 8dd41cebcb44f128205d8f2e1864343a3ee44888 Mon Sep 17 00:00:00 2001 +From: Ricardo Branco +Date: Fri, 30 Jan 2026 20:35:19 +0100 +Subject: [PATCH 2/3] integration: Remove test_create_with_links + +Container links have been replaced by user-defined networks, which +provide better isolation and flexibility without injecting environment +variables. + +https://docs.docker.com/engine/network/links/ + +Signed-off-by: Ricardo Branco +--- + tests/integration/api_container_test.py | 47 ------------------------- + 1 file changed, 47 deletions(-) + +diff --git a/tests/integration/api_container_test.py b/tests/integration/api_container_test.py +index 21c2f35797..b625d428e9 100644 +--- a/tests/integration/api_container_test.py ++++ b/tests/integration/api_container_test.py +@@ -64,53 +64,6 @@ def test_create_with_host_pid_mode(self): + assert 'PidMode' in host_config + assert host_config['PidMode'] == 'host' + +- def test_create_with_links(self): +- res0 = self.client.create_container( +- TEST_IMG, 'cat', +- detach=True, stdin_open=True, +- environment={'FOO': '1'}) +- +- container1_id = res0['Id'] +- self.tmp_containers.append(container1_id) +- +- self.client.start(container1_id) +- +- res1 = self.client.create_container( +- TEST_IMG, 'cat', +- detach=True, stdin_open=True, +- environment={'FOO': '1'}) +- +- container2_id = res1['Id'] +- self.tmp_containers.append(container2_id) +- +- self.client.start(container2_id) +- +- # we don't want the first / +- link_path1 = self.client.inspect_container(container1_id)['Name'][1:] +- link_alias1 = 'mylink1' +- link_env_prefix1 = link_alias1.upper() +- +- link_path2 = self.client.inspect_container(container2_id)['Name'][1:] +- link_alias2 = 'mylink2' +- link_env_prefix2 = link_alias2.upper() +- +- res2 = self.client.create_container( +- TEST_IMG, 'env', host_config=self.client.create_host_config( +- links={link_path1: link_alias1, link_path2: link_alias2}, +- network_mode='bridge' +- ) +- ) +- container3_id = res2['Id'] +- self.tmp_containers.append(container3_id) +- self.client.start(container3_id) +- assert self.client.wait(container3_id)['StatusCode'] == 0 +- +- logs = self.client.logs(container3_id).decode('utf-8') +- assert f'{link_env_prefix1}_NAME=' in logs +- assert f'{link_env_prefix1}_ENV_FOO=1' in logs +- assert f'{link_env_prefix2}_NAME=' in logs +- assert f'{link_env_prefix2}_ENV_FOO=1' in logs +- + def test_create_with_restart_policy(self): + container = self.client.create_container( + TEST_IMG, ['sleep', '2'], + +From 2339d3ed96f61f3735530bc655fbe2e1b2886af0 Mon Sep 17 00:00:00 2001 +From: Ricardo Branco +Date: Fri, 30 Jan 2026 20:55:12 +0100 +Subject: [PATCH 3/3] integration: Also catch NotFound exception + +Otherwise we get this error with Docker v29.2.0: + +E docker.errors.ImageNotFound: 404 Client Error for +http+docker://localhost/v1.45/containers/create: Not Found +("No such image: dockerpytest_does_not_exist:latest") + +Signed-off-by: Ricardo Branco +--- + tests/integration/models_containers_test.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tests/integration/models_containers_test.py b/tests/integration/models_containers_test.py +index 8727455932..4355dd7963 100644 +--- a/tests/integration/models_containers_test.py ++++ b/tests/integration/models_containers_test.py +@@ -36,7 +36,7 @@ def test_run_with_error(self): + + def test_run_with_image_that_does_not_exist(self): + client = docker.from_env(version=TEST_API_VERSION) +- with pytest.raises(docker.errors.ImageNotFound): ++ with pytest.raises((docker.errors.ImageNotFound, docker.errors.NotFound)): + client.containers.run("dockerpytest_does_not_exist") + + @pytest.mark.skipif( diff --git a/data/containers/patches/moby/51970.patch b/data/containers/patches/moby/51970.patch new file mode 100644 index 000000000000..a030f9222a58 --- /dev/null +++ b/data/containers/patches/moby/51970.patch @@ -0,0 +1,82 @@ +From 85aaf27f7adc76cf6a6e373c691ac5348384d138 Mon Sep 17 00:00:00 2001 +From: Ricardo Branco +Date: Sat, 31 Jan 2026 01:00:36 +0100 +Subject: [PATCH 1/2] testutil: Introduce IsSELinuxEnforcing() + +Signed-off-by: Ricardo Branco +--- + internal/testutil/environment/environment.go | 15 +++++++++++++++ + 1 file changed, 15 insertions(+) + +diff --git a/internal/testutil/environment/environment.go b/internal/testutil/environment/environment.go +index c7337d29b52b3..9086f19bf9882 100644 +--- a/internal/testutil/environment/environment.go ++++ b/internal/testutil/environment/environment.go +@@ -209,6 +209,21 @@ func (e *Execution) HasExistingImage(t testing.TB, reference string) bool { + return len(imageList.Items) > 0 + } + ++// IsSELinuxEnforcing returns true if SELinux is enabled and running in enforcing mode. ++// Returns false on non-Linux systems or if SELinux is not available or not enabled. ++func (e *Execution) IsSELinuxEnforcing() bool { ++ if runtime.GOOS != "linux" { ++ return false ++ } ++ ++ data, err := os.ReadFile("/sys/fs/selinux/enforce") ++ if err != nil { ++ return false ++ } ++ ++ return strings.TrimSpace(string(data)) == "1" ++} ++ + // EnsureFrozenImagesLinux loads frozen test images into the daemon + // if they aren't already loaded + func EnsureFrozenImagesLinux(ctx context.Context, testEnv *Execution) error { + +From b2cfcda2d13c447c653175d20aecc52a7f39dbaf Mon Sep 17 00:00:00 2001 +From: Ricardo Branco +Date: Sat, 31 Jan 2026 00:49:36 +0100 +Subject: [PATCH 2/2] integration: Ignore some tests as rootless + +The overlay2 graphdriver doesn't work with SELinux in enforcing mode. + +Signed-off-by: Ricardo Branco +--- + integration/daemon/default_storage_test.go | 1 + + integration/daemon/migration_test.go | 2 ++ + 2 files changed, 3 insertions(+) + +diff --git a/integration/daemon/default_storage_test.go b/integration/daemon/default_storage_test.go +index 180b6a45e1849..fb37bb5b25afb 100644 +--- a/integration/daemon/default_storage_test.go ++++ b/integration/daemon/default_storage_test.go +@@ -35,6 +35,7 @@ func TestDefaultStorageDriver(t *testing.T) { + // migrating to containerd snapshotters automatically. + func TestGraphDriverPersistence(t *testing.T) { + skip.If(t, testEnv.DaemonInfo.OSType == "windows", "Windows does not support running sub-daemons") ++ skip.If(t, testEnv.IsRootless() && testEnv.IsSELinuxEnforcing(), "rootless mode doesn't support overlay2 with SELinux enabled") + t.Setenv("DOCKER_DRIVER", "") + t.Setenv("DOCKER_GRAPHDRIVER", "") + t.Setenv("TEST_INTEGRATION_USE_GRAPHDRIVER", "") +diff --git a/integration/daemon/migration_test.go b/integration/daemon/migration_test.go +index 1eaea453b56ed..575bcceace65f 100644 +--- a/integration/daemon/migration_test.go ++++ b/integration/daemon/migration_test.go +@@ -16,6 +16,7 @@ import ( + ) + + func TestMigrateOverlaySnapshotter(t *testing.T) { ++ skip.If(t, testEnv.IsRootless() && testEnv.IsSELinuxEnforcing(), "rootless mode doesn't support overlay2 with SELinux enabled") + testMigrateSnapshotter(t, "overlay2", "overlayfs") + } + +@@ -89,6 +90,7 @@ func testMigrateSnapshotter(t *testing.T, graphdriver, snapshotter string) { + + func TestMigrateSaveLoad(t *testing.T) { + skip.If(t, runtime.GOOS != "linux") ++ skip.If(t, testEnv.IsRootless() && testEnv.IsSELinuxEnforcing(), "rootless mode doesn't support overlay2 with SELinux enabled") + + t.Setenv("DOCKER_MIGRATE_SNAPSHOTTER_THRESHOLD", "200M") + t.Setenv("DOCKER_DRIVER", "") diff --git a/lib/containers/bats.pm b/lib/containers/bats.pm index e479a2371364..e1b2c8056a1b 100644 --- a/lib/containers/bats.pm +++ b/lib/containers/bats.pm @@ -140,6 +140,10 @@ sub configure_docker { $docker_opts .= " -H tcp://0.0.0.0:$port"; run_command "mv -f /etc/sysconfig/docker{,.bak} || true"; run_command "mv -f /etc/docker/daemon.json{,.bak} || true"; + if (script_output(q(docker --version | awk -F'[. ]' '{ print $3 }')) > 28) { + my $docker_min_api_version = get_var("DOCKER_MIN_API_VERSION", "1.24"); + run_command qq(echo '{"min-api-version": "$docker_min_api_version"}' > /etc/docker/daemon.json); + } run_command qq(echo 'DOCKER_OPTS="$docker_opts"' > /etc/sysconfig/docker); record_info "DOCKER_OPTS", $docker_opts; run_command "systemctl restart docker"; @@ -161,6 +165,12 @@ sub configure_rootless_docker { switch_to_user; + if (script_output(q(docker --version | awk -F'[. ]' '{ print $3 }')) > 28) { + run_command 'mkdir -p ${XDG_CONFIG_HOME:-$HOME/.config}/docker'; + my $docker_min_api_version = get_var("DOCKER_MIN_API_VERSION", "1.24"); + run_command qq(echo '{"min-api-version": "$docker_min_api_version"}' > \${XDG_CONFIG_HOME:-\$HOME/.config}/docker/daemon.json); + } + # https://docs.docker.com/engine/security/rootless/ run_command "dockerd-rootless-setuptool.sh install"; run_command "systemctl --user enable --now docker"; @@ -353,7 +363,7 @@ sub setup_pkgs { } foreach my $repo (split(/\s+/, get_var("TEST_REPOS", ""))) { - run_command "zypper addrepo $repo"; + run_command "zypper addrepo --refresh $repo || true"; } } diff --git a/tests/containers/README.md b/tests/containers/README.md index 899b0f9fd151..dfc43de46711 100644 --- a/tests/containers/README.md +++ b/tests/containers/README.md @@ -21,6 +21,7 @@ The tests rely on some variables: | --- | --- | | `DOCKER_CE` | Test upstream Docker Community Edition | | `DOCKER_EXPERIMENTAL` | Enable experimental features in Docker | +| `DOCKER_MIN_API_VERSION` | Docker minimum API version | | `DOCKER_SELINUX` | Enable SELinux in Docker daemon | | `DOCKER_TLS` | Enable TLS in Docker as documented [here](https://docs.docker.com/engine/security/protect-access/) | | `GITHUB_PATCHES` | List of github PR id's containing upstream test patches | diff --git a/tests/containers/docker_compose.pm b/tests/containers/docker_compose.pm index 2ddcc8ad2e27..3576c2c0af48 100644 --- a/tests/containers/docker_compose.pm +++ b/tests/containers/docker_compose.pm @@ -50,6 +50,14 @@ sub test ($target) { my $env = join " ", map { "$_=\"$env{$_}\"" } sort keys %env; my @xfails = (); + push @xfails, ( + # These fail with Docker v29: https://github.com/docker/compose/issues/13565 + "github.com/docker/compose/v5/pkg/e2e::TestBuildPlatformsStandardErrors", + "github.com/docker/compose/v5/pkg/e2e::TestBuildPlatformsStandardErrors/builder_does_not_support_multi-arch", + "github.com/docker/compose/v5/pkg/e2e::TestComposePull", + "github.com/docker/compose/v5/pkg/e2e::TestLocalComposeRun", + "github.com/docker/compose/v5/pkg/e2e::TestLocalComposeRun/compose_run_-rm_with_stop_signal", + ) unless (is_sle); run_command "$env make $target |& tee $target.txt || true", timeout => 3600; diff --git a/tests/containers/docker_engine.pm b/tests/containers/docker_engine.pm index 4e08fae714ea..f8fd96443f59 100644 --- a/tests/containers/docker_engine.pm +++ b/tests/containers/docker_engine.pm @@ -56,9 +56,9 @@ sub setup { @test_dirs = split(/,/, $test_dirs); } else { # Ignore the tests in these directories in integration/ + # as they fail in the current openQA setup my @ignore_dirs = ( - "network", - "networking", + "network.*", "plugin.*", ); my $ignore_dirs = join "|", map { "integration/$_" } @ignore_dirs; @@ -103,6 +103,15 @@ sub run { # Flaky tests "github.com/docker/docker/integration/service::TestServicePlugin", ); + push @xfails, ( + # We don't yet support CDI + "github.com/moby/moby/v2/integration/container::TestEtcCDI", + # These fail on Docker v29: + "github.com/moby/moby/v2/integration/image::TestImagePullNonExisting", + "github.com/moby/moby/v2/integration/image::TestImagePullNonExisting/asdfasdf", + "github.com/moby/moby/v2/integration/image::TestImagePullNonExisting/library/asdfasdf", + "github.com/moby/moby/v2/integration/service::TestRestoreIngressRulesOnFirewalldReload", + ) unless (is_sle); push @xfails, ( # These tests use amd64 images: "github.com/docker/docker/integration/image::TestAPIImageHistoryCrossPlatform",