summaryrefslogtreecommitdiff
path: root/test/e2e
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-12-12 03:46:31 -0500
committerGitHub <noreply@github.com>2020-12-12 03:46:31 -0500
commit36bec385f33ebc8f0aeb52547f79bd2663521f8f (patch)
tree62a1a7ea22eca4aca0d428c0ae45b067e433a298 /test/e2e
parent1d50245a206b7a18abb0aa6ae363d9fd56b7bd6e (diff)
parent6730556e2f6f98a2eef6914ffadabf8a46aef749 (diff)
downloadpodman-36bec385f33ebc8f0aeb52547f79bd2663521f8f.tar.gz
podman-36bec385f33ebc8f0aeb52547f79bd2663521f8f.tar.bz2
podman-36bec385f33ebc8f0aeb52547f79bd2663521f8f.zip
Merge pull request #7718 from QiWang19/sign-multi-arch
Sign multi-arch images
Diffstat (limited to 'test/e2e')
-rw-r--r--test/e2e/image_sign_test.go16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/e2e/image_sign_test.go b/test/e2e/image_sign_test.go
index c9041eaba..57739419c 100644
--- a/test/e2e/image_sign_test.go
+++ b/test/e2e/image_sign_test.go
@@ -1,6 +1,7 @@
package integration
import (
+ "io/ioutil"
"os"
"os/exec"
"path/filepath"
@@ -58,4 +59,19 @@ var _ = Describe("Podman image sign", func() {
_, err = os.Stat(filepath.Join(sigDir, "library"))
Expect(err).To(BeNil())
})
+
+ It("podman sign --all multi-arch image", func() {
+ cmd := exec.Command("gpg", "--import", "sign/secret-key.asc")
+ err := cmd.Run()
+ Expect(err).To(BeNil())
+ sigDir := filepath.Join(podmanTest.TempDir, "test-sign-multi")
+ err = os.MkdirAll(sigDir, os.ModePerm)
+ Expect(err).To(BeNil())
+ session := podmanTest.Podman([]string{"image", "sign", "--all", "--directory", sigDir, "--sign-by", "foo@bar.com", "docker://library/alpine"})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ fInfos, err := ioutil.ReadDir(filepath.Join(sigDir, "library"))
+ Expect(err).To(BeNil())
+ Expect(len(fInfos) > 1).To(BeTrue())
+ })
})