Fix testing ACME URL
This commit is contained in:
parent
c3a4943d85
commit
643e285965
@ -45,7 +45,6 @@ func init() {
|
||||
var _ = framework.CertManagerDescribe("ACME Certificate (HTTP01)", func() {
|
||||
f := framework.NewDefaultFramework("create-acme-certificate-http01")
|
||||
|
||||
testingACMEURL := framework.TestContext.ACMEURL
|
||||
issuerName := "test-acme-issuer"
|
||||
certificateName := "test-acme-certificate"
|
||||
certificateSecretName := "test-acme-certificate"
|
||||
@ -58,7 +57,7 @@ var _ = framework.CertManagerDescribe("ACME Certificate (HTTP01)", func() {
|
||||
_, err = f.KubeClientSet.CoreV1().Secrets(f.Namespace.Name).Get(certificateSecretName, metav1.GetOptions{})
|
||||
Expect(err).To(MatchError(apierrors.NewNotFound(corev1.Resource("secrets"), certificateSecretName)))
|
||||
By("Creating an Issuer")
|
||||
_, err = f.CertManagerClientSet.CertmanagerV1alpha1().Issuers(f.Namespace.Name).Create(util.NewCertManagerACMEIssuer(issuerName, testingACMEURL, testingACMEEmail, testingACMEPrivateKey))
|
||||
_, err = f.CertManagerClientSet.CertmanagerV1alpha1().Issuers(f.Namespace.Name).Create(util.NewCertManagerACMEIssuer(issuerName, framework.TestContext.ACMEURL, testingACMEEmail, testingACMEPrivateKey))
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
By("Waiting for Issuer to become Ready")
|
||||
err = util.WaitForIssuerCondition(f.CertManagerClientSet.CertmanagerV1alpha1().Issuers(f.Namespace.Name),
|
||||
|
||||
@ -31,6 +31,9 @@ func init() {
|
||||
if "" == framework.TestContext.CertManagerConfig {
|
||||
glog.Fatalf("environment variable %v must be set", framework.RecommendedConfigPathEnvVar)
|
||||
}
|
||||
if "" == framework.TestContext.ACMEURL {
|
||||
glog.Fatalf("flag -acme-url must be set")
|
||||
}
|
||||
}
|
||||
|
||||
func TestE2E(t *testing.T) {
|
||||
|
||||
@ -34,7 +34,6 @@ const foreverTestTimeout = time.Second * 60
|
||||
var _ = framework.CertManagerDescribe("ACME Certificate with Ingress (HTTP01)", func() {
|
||||
f := framework.NewDefaultFramework("create-acme-certificate-http01-ingress")
|
||||
|
||||
testingACMEURL := framework.TestContext.ACMEURL
|
||||
issuerName := "test-acme-issuer"
|
||||
certificateSecretName := "test-acme-certificate"
|
||||
|
||||
@ -46,7 +45,7 @@ var _ = framework.CertManagerDescribe("ACME Certificate with Ingress (HTTP01)",
|
||||
_, err = f.KubeClientSet.CoreV1().Secrets(f.Namespace.Name).Get(certificateSecretName, metav1.GetOptions{})
|
||||
Expect(err).To(MatchError(apierrors.NewNotFound(corev1.Resource("secrets"), certificateSecretName)))
|
||||
By("Creating an Issuer")
|
||||
_, err = f.CertManagerClientSet.CertmanagerV1alpha1().Issuers(f.Namespace.Name).Create(util.NewCertManagerACMEIssuer(issuerName, testingACMEURL, testingACMEEmail, testingACMEPrivateKey))
|
||||
_, err = f.CertManagerClientSet.CertmanagerV1alpha1().Issuers(f.Namespace.Name).Create(util.NewCertManagerACMEIssuer(issuerName, framework.TestContext.ACMEURL, testingACMEEmail, testingACMEPrivateKey))
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
By("Waiting for Issuer to become Ready")
|
||||
err = util.WaitForIssuerCondition(f.CertManagerClientSet.CertmanagerV1alpha1().Issuers(f.Namespace.Name),
|
||||
|
||||
@ -34,7 +34,6 @@ const testingACMEPrivateKey = "test-acme-private-key"
|
||||
var _ = framework.CertManagerDescribe("ACME Issuer", func() {
|
||||
f := framework.NewDefaultFramework("create-acme-issuer")
|
||||
|
||||
testingACMEURL := framework.TestContext.ACMEURL
|
||||
issuerName := "test-acme-issuer"
|
||||
|
||||
BeforeEach(func() {
|
||||
@ -51,7 +50,7 @@ var _ = framework.CertManagerDescribe("ACME Issuer", func() {
|
||||
|
||||
It("should register ACME account", func() {
|
||||
By("Creating an Issuer")
|
||||
_, err := f.CertManagerClientSet.CertmanagerV1alpha1().Issuers(f.Namespace.Name).Create(util.NewCertManagerACMEIssuer(issuerName, testingACMEURL, testingACMEEmail, testingACMEPrivateKey))
|
||||
_, err := f.CertManagerClientSet.CertmanagerV1alpha1().Issuers(f.Namespace.Name).Create(util.NewCertManagerACMEIssuer(issuerName, framework.TestContext.ACMEURL, testingACMEEmail, testingACMEPrivateKey))
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
|
||||
By("Waiting for Issuer to become Ready")
|
||||
@ -85,7 +84,7 @@ var _ = framework.CertManagerDescribe("ACME Issuer", func() {
|
||||
It("should recover a lost ACME account URI", func() {
|
||||
|
||||
By("Creating an Issuer")
|
||||
_, err := f.CertManagerClientSet.CertmanagerV1alpha1().Issuers(f.Namespace.Name).Create(util.NewCertManagerACMEIssuer(issuerName, testingACMEURL, testingACMEEmail, testingACMEPrivateKey))
|
||||
_, err := f.CertManagerClientSet.CertmanagerV1alpha1().Issuers(f.Namespace.Name).Create(util.NewCertManagerACMEIssuer(issuerName, framework.TestContext.ACMEURL, testingACMEEmail, testingACMEPrivateKey))
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
|
||||
By("Waiting for Issuer to become Ready")
|
||||
@ -123,7 +122,7 @@ var _ = framework.CertManagerDescribe("ACME Issuer", func() {
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
|
||||
By("Recreating the Issuer")
|
||||
_, err = f.CertManagerClientSet.CertmanagerV1alpha1().Issuers(f.Namespace.Name).Create(util.NewCertManagerACMEIssuer(issuerName, testingACMEURL, testingACMEEmail, testingACMEPrivateKey))
|
||||
_, err = f.CertManagerClientSet.CertmanagerV1alpha1().Issuers(f.Namespace.Name).Create(util.NewCertManagerACMEIssuer(issuerName, framework.TestContext.ACMEURL, testingACMEEmail, testingACMEPrivateKey))
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
|
||||
By("Waiting for Issuer to become Ready")
|
||||
|
||||
Loading…
Reference in New Issue
Block a user