Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

e2e: serialize gpg tests #18578

Merged
merged 1 commit into from
May 16, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Serial decorators can be added to the Describe() function, this would be better than having to set it for each It() block. Considering that people could add new tests here and may not pay attention to such details

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