Skip to content

Commit

Permalink
Fix assumptions in 'push test --force-compression"'
Browse files Browse the repository at this point in the history
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č <mitr@redhat.com>
  • Loading branch information
mtrmac committed Feb 9, 2024
1 parent 7fd7cbe commit 11db108
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions test/e2e/push_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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())

Expand All @@ -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"})
Expand Down

0 comments on commit 11db108

Please sign in to comment.