Skip to content

Commit

Permalink
test: fix cosign e2e test for the image with no signature (runfinch#372)
Browse files Browse the repository at this point in the history
Issue #, if available:

*Description of changes:*

*Testing done:*
Fix cosign e2e test for the image with no signature


- [ X ] I've reviewed the guidance in CONTRIBUTING.md


#### License Acceptance

By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache 2.0 license.

Signed-off-by: Ziwen Ning <[email protected]>
  • Loading branch information
ningziwen authored Apr 18, 2023
1 parent 19fc0c5 commit 00e4021
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions e2e/container/cosign_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (
)

const (
alpineImage = "public.ecr.aws/docker/library/alpine:latest"
alpineImage = "public.ecr.aws/docker/library/alpine:3"
registryImage = "public.ecr.aws/docker/library/registry:latest"
)

Expand Down Expand Up @@ -77,9 +77,9 @@ var testCosign = func(o *option.Option) {
gomega.Expect(command.RunWithoutSuccessfulExit(o, "run", "-d", "--verify=cosign", "--cosign-key=./cosign_data/test-2.pub",
tag).Err.Contents()).Should(gomega.ContainSubstring("no matching signatures"))
gomega.Expect(command.RunWithoutSuccessfulExit(o, "pull", "--verify=cosign", "--cosign-key=./cosign_data/test-2.pub",
alpineImage).Err.Contents()).Should(gomega.ContainSubstring("no matching signatures"))
alpineImage).Err.Contents()).Should(gomega.ContainSubstring("no signatures found for image"))
gomega.Expect(command.RunWithoutSuccessfulExit(o, "run", "-d", "--verify=cosign", "--cosign-key=./cosign_data/test-2.pub",
alpineImage).Err.Contents()).Should(gomega.ContainSubstring("no matching signatures"))
alpineImage).Err.Contents()).Should(gomega.ContainSubstring("no signatures found for image"))
})
})
}

0 comments on commit 00e4021

Please sign in to comment.