Merge pull request #21793 from mtrmac/allow-zstd-config

Adjust some tests to work with Zstd in containers.conf
This commit is contained in:
openshift-merge-bot[bot]
2024-02-22 22:02:55 +00:00
committed by GitHub
3 changed files with 3 additions and 4 deletions

View File

@ -197,7 +197,7 @@ var _ = Describe("Podman manifest", func() {
session.WaitWithDefaultTimeout() session.WaitWithDefaultTimeout()
Expect(session).Should(ExitCleanly()) 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() push.WaitWithDefaultTimeout()
Expect(push).Should(Exit(0)) Expect(push).Should(Exit(0))
output := push.ErrorToString() output := push.ErrorToString()

View File

@ -106,7 +106,7 @@ var _ = Describe("Podman push", func() {
session.WaitWithDefaultTimeout() session.WaitWithDefaultTimeout()
Expect(session).Should(ExitCleanly()) 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() push.WaitWithDefaultTimeout()
Expect(push).Should(ExitCleanly()) Expect(push).Should(ExitCleanly())
@ -115,7 +115,6 @@ var _ = Describe("Podman push", func() {
skopeo.WaitWithDefaultTimeout() skopeo.WaitWithDefaultTimeout()
Expect(skopeo).Should(ExitCleanly()) Expect(skopeo).Should(ExitCleanly())
output := skopeo.OutputToString() 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")) 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"}) push = podmanTest.Podman([]string{"push", "-q", "--tls-verify=false", "--force-compression=false", "--compression-format", "zstd", "--remove-signatures", "imageone", "localhost:5000/image"})

View File

@ -131,7 +131,7 @@ EOF
# Push to local registry; the magic key here is --add-compression... # Push to local registry; the magic key here is --add-compression...
local manifestpushed="localhost:${PODMAN_LOGIN_REGISTRY_PORT}/test:1.0" 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 # ...and use skopeo to confirm that each component has the right settings
echo "$_LOG_PROMPT skopeo inspect ... $manifestpushed" echo "$_LOG_PROMPT skopeo inspect ... $manifestpushed"