Skip to content

Commit 922ee64

Browse files
committed
Re-enable test/extended/images/signatures.go
Don't read the image to be signed from docker.io. Instead, sign the just-built signer image (which is unique, so there always should be enough free signature slots left). Send the required credentials to the source registry. Also use the injected service CA instead of disabling TLS. I don't know whether it is supposed to work like that (per https://github.com/openshift/openshift-docs/blob/enterprise-4.1/release_notes/ocp-4-1-release-notes.adoc#service-ca-bundle-changes the path is deprecated) but the same path is already assumed to exist by the preceding (oc login). Signed-off-by: Miloslav Trmač <[email protected]>
1 parent 903e435 commit 922ee64

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

test/extended/images/signatures.go

+8-5
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ var _ = g.Describe("[sig-imageregistry][Serial][Suite:openshift/registry/serial]
2222
)
2323

2424
g.It("can push a signed image to openshift registry and verify it", func() {
25-
g.Skip("disable because containers/image: https://github.com/containers/image/pull/570")
2625
g.By("building a signer image that knows how to sign images")
2726
output, err := oc.Run("create").Args("-f", signerBuildFixture).Output()
2827
if err != nil {
@@ -90,7 +89,7 @@ var _ = g.Describe("[sig-imageregistry][Serial][Suite:openshift/registry/serial]
9089
o.Expect(out).To(o.ContainSubstring("Logged in"))
9190

9291
// Sign and copy the memcached image into target image stream tag
93-
g.By("signing the memcached:latest image and pushing it into openshift registry")
92+
g.By("signing a just-built image and pushing it into openshift registry")
9493
out, err = pod.Exec(strings.Join([]string{
9594
"GNUPGHOME=/var/lib/origin/gnupg",
9695
"skopeo", "--debug",
@@ -99,10 +98,14 @@ var _ = g.Describe("[sig-imageregistry][Serial][Suite:openshift/registry/serial]
9998
"--registries.d", "/this/does/not/exist",
10099

101100
"copy", "--sign-by", "[email protected]",
101+
"--src-creds=" + user + ":" + token,
102102
"--dest-creds=" + user + ":" + token,
103-
// TODO: test with this turned to true as well
104-
"--dest-tls-verify=false",
105-
"docker://docker.io/library/memcached:latest",
103+
104+
// Expect to use /run/secrets/kubernetes.io/serviceaccount/ca.crt
105+
"--src-cert-dir=/run/secrets/kubernetes.io/serviceaccount",
106+
"--dest-cert-dir=/run/secrets/kubernetes.io/serviceaccount",
107+
108+
"docker://" + signerImage,
106109
"docker://" + signedImage,
107110
}, " "))
108111
fmt.Fprintf(g.GinkgoWriter, "output: %s\n", out)

0 commit comments

Comments
 (0)