From 8e99c697fcc5176db6383cafc2855314ec248332 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miloslav=20Trma=C4=8D?= Date: Thu, 8 Feb 2024 21:16:13 +0100 Subject: [PATCH 1/2] Fix assumptions in 'push test --force-compression"' MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When we want the original image to be gzip, explicitly ask for that instead of assuming the containers.conf defaults do that. Signed-off-by: Miloslav Trmač --- test/e2e/push_test.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/test/e2e/push_test.go b/test/e2e/push_test.go index 3da5536003..d0b1beea86 100644 --- a/test/e2e/push_test.go +++ b/test/e2e/push_test.go @@ -106,7 +106,7 @@ var _ = Describe("Podman push", func() { session.WaitWithDefaultTimeout() Expect(session).Should(ExitCleanly()) - push := podmanTest.Podman([]string{"push", "-q", "--tls-verify=false", "--remove-signatures", "imageone", "localhost:5000/image"}) + push := podmanTest.Podman([]string{"push", "-q", "--tls-verify=false", "--force-compression=true", "--compression-format", "gzip", "--remove-signatures", "imageone", "localhost:5000/image"}) push.WaitWithDefaultTimeout() Expect(push).Should(ExitCleanly()) @@ -115,7 +115,6 @@ var _ = Describe("Podman push", func() { skopeo.WaitWithDefaultTimeout() Expect(skopeo).Should(ExitCleanly()) output := skopeo.OutputToString() - // Default compression is gzip and push with `--force-compression=false` no traces of `zstd` should be there. Expect(output).ToNot(ContainSubstring("zstd")) push = podmanTest.Podman([]string{"push", "-q", "--tls-verify=false", "--force-compression=false", "--compression-format", "zstd", "--remove-signatures", "imageone", "localhost:5000/image"}) From 3e76e594b8f51b238925f66f1fb74e23b7b3d919 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miloslav=20Trma=C4=8D?= Date: Thu, 8 Feb 2024 21:19:41 +0100 Subject: [PATCH 2/2] Fix assumptions in 'push with --add-compression and --force-compression' MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When we want the original image to be gzip, explicitly ask for that instead of assuming the containers.conf defaults do that. Signed-off-by: Miloslav Trmač --- test/e2e/manifest_test.go | 2 +- test/system/012-manifest.bats | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/e2e/manifest_test.go b/test/e2e/manifest_test.go index 297c32662c..56b65425f9 100644 --- a/test/e2e/manifest_test.go +++ b/test/e2e/manifest_test.go @@ -197,7 +197,7 @@ var _ = Describe("Podman manifest", func() { session.WaitWithDefaultTimeout() Expect(session).Should(ExitCleanly()) - push := podmanTest.Podman([]string{"manifest", "push", "--all", "--add-compression", "zstd", "--tls-verify=false", "--remove-signatures", "foobar", "localhost:5000/list"}) + push := podmanTest.Podman([]string{"manifest", "push", "--all", "--compression-format", "gzip", "--add-compression", "zstd", "--tls-verify=false", "--remove-signatures", "foobar", "localhost:5000/list"}) push.WaitWithDefaultTimeout() Expect(push).Should(Exit(0)) output := push.ErrorToString() diff --git a/test/system/012-manifest.bats b/test/system/012-manifest.bats index 1e672a9490..30e16e9423 100644 --- a/test/system/012-manifest.bats +++ b/test/system/012-manifest.bats @@ -131,7 +131,7 @@ EOF # Push to local registry; the magic key here is --add-compression... local manifestpushed="localhost:${PODMAN_LOGIN_REGISTRY_PORT}/test:1.0" - run_podman manifest push --authfile=$authfile --all --add-compression zstd --tls-verify=false $manifestlocal $manifestpushed + run_podman manifest push --authfile=$authfile --all --compression-format gzip --add-compression zstd --tls-verify=false $manifestlocal $manifestpushed # ...and use skopeo to confirm that each component has the right settings echo "$_LOG_PROMPT skopeo inspect ... $manifestpushed"