From 6efc97266d5596e4cc7f374bc98b99d6bc6a03e9 Mon Sep 17 00:00:00 2001 From: James Munnelly Date: Sat, 10 Feb 2018 01:26:20 +0000 Subject: [PATCH] Use pebble instead of boulder in e2e tests --- Makefile | 4 ++-- test/e2e/e2e.go | 14 +++++++------- test/e2e/framework/test_context.go | 12 ++++++------ test/util/util.go | 5 +++-- 4 files changed, 18 insertions(+), 17 deletions(-) diff --git a/Makefile b/Makefile index ece787b62..dd23dfc25 100644 --- a/Makefile +++ b/Makefile @@ -11,7 +11,7 @@ BUILD_TAG := build # e2e tests. E2E_NGINX_CERTIFICATE_DOMAIN= -BOULDER_IMAGE_REPO=quay.io/munnerz/boulder +PEBBLE_IMAGE_REPO=quay.io/munnerz/pebble # AppVersion is set as the AppVersion to be compiled into the controller binary. # It's used as the default version of the 'acmesolver' image to use for ACME @@ -115,7 +115,7 @@ e2e_test: KUBECONFIG=$$HOME/.kube/config CERTMANAGERCONFIG=$$HOME/.kube/config \ ./e2e-tests \ -acme-nginx-certificate-domain=$(E2E_NGINX_CERTIFICATE_DOMAIN) \ - -boulder-image-repo=$(BOULDER_IMAGE_REPO) \ + -pebble-image-repo=$(PEBBLE_IMAGE_REPO) \ -report-dir=./_artifacts # Docker targets diff --git a/test/e2e/e2e.go b/test/e2e/e2e.go index 03dfbbb23..7467e1384 100644 --- a/test/e2e/e2e.go +++ b/test/e2e/e2e.go @@ -51,16 +51,16 @@ func RunE2ETests(t *testing.T) { glog.Infof("Installing cert-manager helm chart") InstallHelmChart(t, releaseName, "./contrib/charts/cert-manager", certManagerDeploymentNamespace, "./test/fixtures/cert-manager-values.yaml") - glog.Infof("Installing boulder chart") - // 10 minute timeout for boulder install due to large images + glog.Infof("Installing pebble chart") + // 10 minute timeout for pebble install due to large images extraArgs := []string{"--timeout", "600"} - if framework.TestContext.BoulderImageRepo != "" { - extraArgs = append(extraArgs, "--set", "image.repository="+framework.TestContext.BoulderImageRepo) + if framework.TestContext.PebbleImageRepo != "" { + extraArgs = append(extraArgs, "--set", "image.repository="+framework.TestContext.PebbleImageRepo) } - if framework.TestContext.BoulderImageTag != "" { - extraArgs = append(extraArgs, "--set", "image.tag="+framework.TestContext.BoulderImageTag) + if framework.TestContext.PebbleImageTag != "" { + extraArgs = append(extraArgs, "--set", "image.tag="+framework.TestContext.PebbleImageTag) } - InstallHelmChart(t, "boulder", "./contrib/charts/boulder", "boulder", "./test/fixtures/boulder-values.yaml", extraArgs...) + InstallHelmChart(t, "pebble", "./contrib/charts/pebble", "pebble", "./test/fixtures/pebble-values.yaml", extraArgs...) glog.Infof("Starting e2e run %q on Ginkgo node %d", framework.RunId, config.GinkgoConfig.ParallelNode) var r []ginkgo.Reporter diff --git a/test/e2e/framework/test_context.go b/test/e2e/framework/test_context.go index 2ebb0ec66..35cd841ee 100644 --- a/test/e2e/framework/test_context.go +++ b/test/e2e/framework/test_context.go @@ -35,9 +35,9 @@ type TestContextType struct { CertManagerConfig string CertManagerContext string - BoulderImageRepo string - BoulderImageTag string - ACMEURL string + PebbleImageRepo string + PebbleImageTag string + ACMEURL string ReportDir string } @@ -61,9 +61,9 @@ 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", "", "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/dir", "The ACME test server to use in e2e tests") + flag.StringVar(&TestContext.PebbleImageRepo, "pebble-image-repo", "", "The container image repository for pebble to use in e2e tests") + flag.StringVar(&TestContext.PebbleImageTag, "pebble-image-tag", "", "The container image tag for pebble to use in e2e tests") + flag.StringVar(&TestContext.ACMEURL, "acme-url", "https://pebble.pebble.svc.cluster.local/dir", "The ACME test server to use in e2e tests") flag.StringVar(&TestContext.ReportDir, "report-dir", "", "Optional directory to store junit output in. If not specified, no junit file will be output") } diff --git a/test/util/util.go b/test/util/util.go index 88c3695a1..b1b96a11d 100644 --- a/test/util/util.go +++ b/test/util/util.go @@ -232,8 +232,9 @@ func NewCertManagerACMEIssuer(name, acmeURL, acmeEmail, acmePrivateKey string) * Spec: v1alpha1.IssuerSpec{ IssuerConfig: v1alpha1.IssuerConfig{ ACME: &v1alpha1.ACMEIssuer{ - Email: acmeEmail, - Server: acmeURL, + Email: acmeEmail, + Server: acmeURL, + SkipTLSVerify: true, PrivateKey: v1alpha1.SecretKeySelector{ LocalObjectReference: v1alpha1.LocalObjectReference{ Name: acmePrivateKey,