Skip to content
This repository was archived by the owner on Apr 17, 2025. It is now read-only.

Commit 6af20e0

Browse files
authored
Merge pull request #1487 from adrianludwin/cr020
Update cert-rotator to 0.2.0; tweak test targets
2 parents ba35057 + 89b6f66 commit 6af20e0

File tree

5 files changed

+73
-134
lines changed

5 files changed

+73
-134
lines changed

incubator/hnc/Makefile

Lines changed: 27 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ kind-deploy:
263263
# HNC_FOCUS=772 make test-e2e # only runs the test for issue 772
264264
# HNC_FOCUS=Quickstart make test-e2e # Runs all tests in the "Quickstart" Describe block
265265
.PHONY: test-e2e
266-
test-e2e: exclude-system-namespaces
266+
test-e2e: warn-hnc-repair exclude-system-namespaces
267267
go clean -testcache
268268
ifndef HNC_FOCUS
269269
go test -v -timeout 0 ./test/e2e/...
@@ -274,14 +274,21 @@ endif
274274
# This batch test will run e2e tests N times on the current cluster the user
275275
# deployed (either kind or a kubernetes cluster), e.g. "make test-e2e-batch N=10"
276276
.PHONY: test-e2e-batch
277-
test-e2e-batch: exclude-system-namespaces
277+
test-e2e-batch: warn-hnc-repair exclude-system-namespaces
278278
number=1 ; while [[ $$number -le $N ]] ; do \
279279
echo $$number ; \
280280
((number = number + 1)) ; \
281281
go clean -testcache ; \
282282
go test -v -timeout 0 ./test/e2e/... ; \
283283
done
284284

285+
# This will *only* run a small number of tests (specifically, the quickstarts). You can run this when you're fairly confident that
286+
# everything will work, but be sure to watch for the postsubmits and periodic tests to ensure they pass too.
287+
.PHONY: test-smoke
288+
test-smoke: exclude-system-namespaces
289+
go clean --testcache
290+
go test -v -timeout 0 ./test/e2e/... -args --ginkgo.focus "Quickstart"
291+
285292
# exclude-system-namespaces is called before we run any e2e tests. We do ensure
286293
# the system namespaces are excluded in the "deploy" target. However, we need to
287294
# do it here too in case users install HNC by applying manifests. Ensuring the
@@ -298,14 +305,28 @@ exclude-system-namespaces:
298305
@echo "If these tests fail due to the webhook not being ready, wait 30s and try again. Note that webhooks can take up to 30s to become ready"
299306
@echo "after HNC is first deployed in a cluster."
300307
@echo
308+
309+
warn-hnc-repair:
310+
@echo "************************************************************"
301311
ifndef HNC_REPAIR
302-
@echo "******************************************************"
303312
@echo "HNC_REPAIR IS NOT SET. CRITICAL TESTS WILL BE SKIPPED."
304-
@echo "You have 5s to hit Ctrl-C to cancel and try again."
305-
@echo "******************************************************"
306313
@echo
307-
@sleep 5
314+
@echo "If HNC is installed via an operator (e.g. GKE Hierarchy"
315+
@echo "Controller), this is probably what you want to do. Otherwise,"
316+
@echo "consider setting HNC_REPAIR to run the full set of tests."
317+
else
318+
@echo "HNC_REPAIR IS SET; ENSURE YOU HAVE PERMISSION TO MODIFY HNC"
319+
@echo "CONFIGS."
320+
@echo
321+
@echo "If HNC is installed via an operator (e.g. GKE Hierarchy"
322+
@echo "Controller), these tests will fail and your cluster could"
323+
@echo "be left in a bad state."
308324
endif
325+
@echo
326+
@echo "You have 3s to hit Ctrl-C to cancel..."
327+
@echo "************************************************************"
328+
@echo
329+
@sleep 3
309330

310331
###################### RELEASE ACTIONS #########################
311332
# Build the container image by Cloud Build and build YAMLs locally

incubator/hnc/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ require (
1212
github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 // indirect
1313
github.com/onsi/ginkgo v1.14.1
1414
github.com/onsi/gomega v1.10.2
15-
github.com/open-policy-agent/cert-controller v0.0.0-20210202184811-4842e4760ab0
15+
github.com/open-policy-agent/cert-controller v0.2.0
1616
github.com/spf13/cobra v1.1.1
1717
go.opencensus.io v0.22.3
1818
go.uber.org/zap v1.15.0

0 commit comments

Comments
 (0)