Merge pull request #129 from jetstack-experimental/verify-ca-certificate-e2e

Verify TLS certificate is produced in certificate_ca tests
This commit is contained in:
James Munnelly 2017-10-18 11:37:12 +01:00 committed by GitHub
commit db1a2c1042

View File

@ -16,6 +16,7 @@ package certificate
import (
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/util/wait"
"github.com/jetstack-experimental/cert-manager/pkg/apis/certmanager/v1alpha1"
@ -65,6 +66,12 @@ var _ = framework.CertManagerDescribe("CA Certificate", func() {
Status: v1alpha1.ConditionTrue,
}, wait.ForeverTestTimeout)
Expect(err).NotTo(HaveOccurred())
By("Verifying TLS certificate exists")
secret, err := f.KubeClientSet.CoreV1().Secrets(f.Namespace.Name).Get(certificateSecretName, metav1.GetOptions{})
Expect(err).NotTo(HaveOccurred())
if len(secret.Data) != 2 {
Fail("Expected 2 keys in certificate secret, but there was %d", len(secret.Data))
}
})
It("should generate a signed keypair from a clusterissuer", func() {