From d11f967e821b93aa379e7c0906bec3963a61d16f Mon Sep 17 00:00:00 2001 From: Aditya R Date: Tue, 7 Nov 2023 17:37:48 +0530 Subject: [PATCH] test,push: --force-compression revert gzip with zstd Rawhide now defaults to `zstd:chunked` so revert test to look for gzip after --force-compression Signed-off-by: Aditya R --- test/e2e/push_test.go | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/test/e2e/push_test.go b/test/e2e/push_test.go index 5a8944b7a3c3..27c73da3d838 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", "--compression-format", "zstd", "--remove-signatures", "imageone", "localhost:5000/image"}) push.WaitWithDefaultTimeout() Expect(push).Should(ExitCleanly()) @@ -115,10 +115,10 @@ 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")) + // Original compression is zstd and push with `--force-compression=false` no traces of `gzip` should be there. + Expect(output).To(ContainSubstring("zstd")) - push = podmanTest.Podman([]string{"push", "-q", "--tls-verify=false", "--force-compression=false", "--compression-format", "zstd", "--remove-signatures", "imageone", "localhost:5000/image"}) + push = podmanTest.Podman([]string{"push", "-q", "--tls-verify=false", "--force-compression=false", "--compression-format", "gzip", "--remove-signatures", "imageone", "localhost:5000/image"}) push.WaitWithDefaultTimeout() Expect(push).Should(ExitCleanly()) @@ -126,11 +126,11 @@ var _ = Describe("Podman push", func() { skopeo.WaitWithDefaultTimeout() Expect(skopeo).Should(ExitCleanly()) output = skopeo.OutputToString() - // Although `--compression-format` is `zstd` but still no traces of `zstd` should be in image - // since blobs must be reused from last `gzip` image. - Expect(output).ToNot(ContainSubstring("zstd")) + // Although `--compression-format` is `gzip` but still no traces of `gzip` should be in image + // since blobs must be reused from last `zstd` image. + Expect(output).To(ContainSubstring("zstd")) - push = podmanTest.Podman([]string{"push", "-q", "--tls-verify=false", "--compression-format", "zstd", "--force-compression", "--remove-signatures", "imageone", "localhost:5000/image"}) + push = podmanTest.Podman([]string{"push", "-q", "--tls-verify=false", "--compression-format", "gzip", "--force-compression", "--remove-signatures", "imageone", "localhost:5000/image"}) push.WaitWithDefaultTimeout() Expect(push).Should(ExitCleanly()) @@ -138,8 +138,8 @@ var _ = Describe("Podman push", func() { skopeo.WaitWithDefaultTimeout() Expect(skopeo).Should(ExitCleanly()) output = skopeo.OutputToString() - // Should contain `zstd` layer, substring `zstd` is enough to confirm in skopeo inspect output that `zstd` layer is present. - Expect(output).To(ContainSubstring("zstd")) + // Should contain `gzip` layer, substring `` is enough to confirm in skopeo inspect output that `zstd` layer is present. + Expect(output).ToNot(ContainSubstring("zstd")) }) It("podman push to local registry", func() {