mirror of https://github.com/containers/podman.git
Update encryption tests to avoid a warning if zstd:chunked is the default
It is not the default _yet_, but we are testing such setups. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
This commit is contained in:
parent
059c298389
commit
84eb640160
|
@ -175,7 +175,9 @@ var _ = Describe("Podman push", func() {
|
||||||
Expect(err).ToNot(HaveOccurred())
|
Expect(err).ToNot(HaveOccurred())
|
||||||
|
|
||||||
if !IsRemote() { // Remote does not support --encryption-key
|
if !IsRemote() { // Remote does not support --encryption-key
|
||||||
push = podmanTest.Podman([]string{"push", "-q", "--encryption-key", "jwe:" + publicKeyFileName, "--tls-verify=false", "--remove-signatures", ALPINE, "localhost:5003/my-alpine"})
|
// Explicitly specify compression-format because encryption and zstd:chunked together triggers a warning:
|
||||||
|
// Compression using zstd:chunked is not beneficial for encrypted layers, using plain zstd instead
|
||||||
|
push = podmanTest.Podman([]string{"push", "-q", "--encryption-key", "jwe:" + publicKeyFileName, "--tls-verify=false", "--remove-signatures", "--compression-format=zstd", ALPINE, "localhost:5003/my-alpine"})
|
||||||
push.WaitWithDefaultTimeout()
|
push.WaitWithDefaultTimeout()
|
||||||
Expect(push).Should(ExitCleanly())
|
Expect(push).Should(ExitCleanly())
|
||||||
}
|
}
|
||||||
|
@ -352,7 +354,9 @@ var _ = Describe("Podman push", func() {
|
||||||
publicKeyFileName, _, err := WriteRSAKeyPair(keyFileName, bitSize)
|
publicKeyFileName, _, err := WriteRSAKeyPair(keyFileName, bitSize)
|
||||||
Expect(err).ToNot(HaveOccurred())
|
Expect(err).ToNot(HaveOccurred())
|
||||||
|
|
||||||
session := podmanTest.Podman([]string{"push", "-q", "--encryption-key", "jwe:" + publicKeyFileName, ALPINE, fmt.Sprintf("oci:%s", bbdir)})
|
// Explicitly specify compression-format because encryption and zstd:chunked together triggers a warning:
|
||||||
|
// Compression using zstd:chunked is not beneficial for encrypted layers, using plain zstd instead
|
||||||
|
session := podmanTest.Podman([]string{"push", "-q", "--encryption-key", "jwe:" + publicKeyFileName, "--compression-format=zstd", ALPINE, fmt.Sprintf("oci:%s", bbdir)})
|
||||||
session.WaitWithDefaultTimeout()
|
session.WaitWithDefaultTimeout()
|
||||||
Expect(session).Should(ExitCleanly())
|
Expect(session).Should(ExitCleanly())
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue