docker-stable/0010-TESTS-backport-fixes-for-integration-tests.patch

66 lines
2.3 KiB
Diff
Raw Normal View History

- Update docker-buildx to v0.19.2. See upstream changelog online at <https://github.com/docker/buildx/releases/tag/v0.19.2>. Some notable changelogs from the last update: * <https://github.com/docker/buildx/releases/tag/v0.19.0> * <https://github.com/docker/buildx/releases/tag/v0.18.0> - Update to Go 1.22. - Add a new toggle file /etc/docker/suse-secrets-enable which allows users to disable the SUSEConnect integration with Docker (which creates special mounts in /run/secrets to allow container-suseconnect to authenticate containers with registries on registered hosts). bsc#1231348 bsc#1232999 In order to disable these mounts, just do echo 0 > /etc/docker/suse-secrets-enable and restart Docker. In order to re-enable them, just do echo 1 > /etc/docker/suse-secrets-enable and restart Docker. Docker will output information on startup to tell you whether the SUSE secrets feature is enabled or not. * 0002-SECRETS-SUSE-implement-SUSE-container-secrets.patch - Add docker-integration-tests-devel subpackage for building and running the upstream Docker integration tests on machines to test that Docker works properly. Users should not install this package. - docker-rpmlintrc updated to include allow-list for all of the integration tests package, since it contains a bunch of stuff that wouldn't normally be allowed. - Added patches: + 0010-TESTS-backport-fixes-for-integration-tests.patch OBS-URL: https://build.opensuse.org/package/show/Virtualization:containers/docker-stable?expand=0&rev=11
2024-12-11 10:51:10 +00:00
From 971d5a3b8431c9263060b12c6b131ebb8158a389 Mon Sep 17 00:00:00 2001
From: Aleksa Sarai <cyphar@cyphar.com>
Date: Thu, 21 Nov 2024 20:00:07 +1100
Subject: [PATCH 10/10] TESTS: backport fixes for integration tests
We need a couple of patches to make the tests work on SLES:
* 143b3b2ef3d0 ("test: update registry version to latest")
* 1a453abfb172 ("integration-cli: don't skip AppArmor tests on SLES")
Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
---
Dockerfile | 2 +-
integration-cli/requirements_test.go | 3 ---
testutil/registry/registry.go | 4 +++-
3 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/Dockerfile b/Dockerfile
index 463d5cfc1a86..7a23962af09b 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -59,7 +59,7 @@ WORKDIR /go/src/github.com/docker/distribution
# from the https://github.com/docker/distribution repository. This version of
# the registry is used to test both schema 1 and schema 2 manifests. Generally,
# the version specified here should match a current release.
-ARG REGISTRY_VERSION=v2.3.0
+ARG REGISTRY_VERSION=v2.8.2
# REGISTRY_VERSION_SCHEMA1 specifies the version of the registry to build and
# install from the https://github.com/docker/distribution repository. This is
# an older (pre v2.3.0) version of the registry that only supports schema1
diff --git a/integration-cli/requirements_test.go b/integration-cli/requirements_test.go
index 2313272d7704..e5f72397e1bc 100644
--- a/integration-cli/requirements_test.go
+++ b/integration-cli/requirements_test.go
@@ -85,9 +85,6 @@ func Network() bool {
}
func Apparmor() bool {
- if strings.HasPrefix(testEnv.DaemonInfo.OperatingSystem, "SUSE Linux Enterprise Server ") {
- return false
- }
buf, err := os.ReadFile("/sys/module/apparmor/parameters/enabled")
return err == nil && len(buf) > 1 && buf[0] == 'Y'
}
diff --git a/testutil/registry/registry.go b/testutil/registry/registry.go
index 9213db2ba21a..d8bfe17678a4 100644
--- a/testutil/registry/registry.go
+++ b/testutil/registry/registry.go
@@ -107,10 +107,12 @@ http:
}
binary := V2binary
+ args := []string{"serve", confPath}
if c.schema1 {
binary = V2binarySchema1
+ args = []string{confPath}
}
- cmd := exec.Command(binary, confPath)
+ cmd := exec.Command(binary, args...)
cmd.Stdout = c.stdout
cmd.Stderr = c.stderr
if err := cmd.Start(); err != nil {
--
2.47.1