Skip to content

Commit

Permalink
Merge pull request #18578 from edsantiago/gpg_serialize
Browse files Browse the repository at this point in the history
e2e: serialize gpg tests
  • Loading branch information
openshift-merge-robot authored May 16, 2023
2 parents 07d2fbc + a485ba5 commit 9eaa390
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions test/e2e/image_sign_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,17 @@ var _ = Describe("Podman image sign", func() {
})

AfterEach(func() {
// There's no way to run gpg without an agent, so, clean up
// after every test. No need to check error status.
cmd := exec.Command("gpgconf", "--kill", "gpg-agent")
cmd.Stdout = GinkgoWriter
cmd.Stderr = GinkgoWriter
_ = cmd.Run()

os.Setenv("GNUPGHOME", origGNUPGHOME)
})

It("podman sign image", func() {
It("podman sign image", Serial, func() {
cmd := exec.Command("gpg", "--import", "sign/secret-key.asc")
cmd.Stdout = GinkgoWriter
cmd.Stderr = GinkgoWriter
Expand All @@ -45,7 +52,7 @@ var _ = Describe("Podman image sign", func() {
Expect(err).ToNot(HaveOccurred())
})

It("podman sign --all multi-arch image", func() {
It("podman sign --all multi-arch image", Serial, func() {
cmd := exec.Command("gpg", "--import", "sign/secret-key.asc")
cmd.Stdout = GinkgoWriter
cmd.Stderr = GinkgoWriter
Expand Down

0 comments on commit 9eaa390

Please sign in to comment.