From 00e40210ddd6c4d0d6eea1d78970e27b9b76683f Mon Sep 17 00:00:00 2001 From: Ziwen Ning Date: Mon, 17 Apr 2023 19:48:03 -0700 Subject: [PATCH] test: fix cosign e2e test for the image with no signature (#372) 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 --- e2e/container/cosign_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/e2e/container/cosign_test.go b/e2e/container/cosign_test.go index c23380b0a..bf579c998 100644 --- a/e2e/container/cosign_test.go +++ b/e2e/container/cosign_test.go @@ -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" ) @@ -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")) }) }) }