From 228e45e2bb6ce12492a434f0cc369b6551a1eedf Mon Sep 17 00:00:00 2001 From: James Munnelly Date: Sat, 13 Jan 2018 16:07:59 +0000 Subject: [PATCH] Properly set ACMEURL in e2e tests --- test/e2e/certificate/certificate_acme.go | 3 +-- test/e2e/framework/test_context.go | 4 ++-- test/e2e/ingress/certificate_acme.go | 3 +-- test/e2e/issuer/issuer_acme.go | 11 +++++------ 4 files changed, 9 insertions(+), 12 deletions(-) diff --git a/test/e2e/certificate/certificate_acme.go b/test/e2e/certificate/certificate_acme.go index 86ea3ea24..a6271728d 100644 --- a/test/e2e/certificate/certificate_acme.go +++ b/test/e2e/certificate/certificate_acme.go @@ -30,8 +30,6 @@ import ( "github.com/jetstack/cert-manager/test/util" ) -var testingACMEURL = framework.TestContext.ACMEURL - const invalidACMEURL = "http://not-a-real-acme-url.com" const testingACMEEmail = "test@example.com" const testingACMEPrivateKey = "test-acme-private-key" @@ -47,6 +45,7 @@ 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" diff --git a/test/e2e/framework/test_context.go b/test/e2e/framework/test_context.go index bb26d413b..8fb64fc3e 100644 --- a/test/e2e/framework/test_context.go +++ b/test/e2e/framework/test_context.go @@ -59,8 +59,8 @@ func RegisterCommonFlags() { flag.StringVar(&TestContext.CertManagerHost, "cert-manager-host", "http://127.0.0.1:30000", "The cert-manager host, or apiserver, to connect to") flag.StringVar(&TestContext.CertManagerConfig, "cert-manager-config", os.Getenv(RecommendedConfigPathEnvVar), "Path to config containing embedded authinfo for cert-manager. Default value is from environment variable "+RecommendedConfigPathEnvVar) flag.StringVar(&TestContext.CertManagerContext, "cert-manager-context", "", "config context to use for cert-manager. If unset, will use value from 'current-context'") - flag.StringVar(&TestContext.BoulderImageRepo, "boulder-image-repo", "quay.io/munnerz/boulder", "The container image repository for boulder to use in e2e tests") - flag.StringVar(&TestContext.BoulderImageTag, "boulder-image-tag", "20180113", "The container image tag for boulder to use in e2e tests") + flag.StringVar(&TestContext.BoulderImageRepo, "boulder-image-repo", "", "The container image repository for boulder to use in e2e tests") + flag.StringVar(&TestContext.BoulderImageTag, "boulder-image-tag", "", "The container image tag for boulder to use in e2e tests") flag.StringVar(&TestContext.ACMEURL, "acme-url", "http://boulder.boulder.svc.cluster.local:4000/directory", "The ACME test server to use in e2e tests") } diff --git a/test/e2e/ingress/certificate_acme.go b/test/e2e/ingress/certificate_acme.go index 2b9598718..0c2bc42a5 100644 --- a/test/e2e/ingress/certificate_acme.go +++ b/test/e2e/ingress/certificate_acme.go @@ -27,8 +27,6 @@ import ( "github.com/jetstack/cert-manager/test/util" ) -var testingACMEURL = framework.TestContext.ACMEURL - const testingACMEEmail = "test@example.com" const testingACMEPrivateKey = "test-acme-private-key" const foreverTestTimeout = time.Second * 60 @@ -36,6 +34,7 @@ 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" diff --git a/test/e2e/issuer/issuer_acme.go b/test/e2e/issuer/issuer_acme.go index 2bb5c0fe3..81c83a6ca 100644 --- a/test/e2e/issuer/issuer_acme.go +++ b/test/e2e/issuer/issuer_acme.go @@ -27,9 +27,14 @@ import ( "github.com/jetstack/cert-manager/test/util" ) +const invalidACMEURL = "http://not-a-real-acme-url.com" +const testingACMEEmail = "test@example.com" +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() { @@ -161,9 +166,3 @@ var _ = framework.CertManagerDescribe("ACME Issuer", func() { Expect(err).NotTo(HaveOccurred()) }) }) - -var testingACMEURL = framework.TestContext.ACMEURL - -const invalidACMEURL = "http://not-a-real-acme-url.com" -const testingACMEEmail = "test@example.com" -const testingACMEPrivateKey = "test-acme-private-key"