@@ -263,7 +263,7 @@ kind-deploy:
263
263
# HNC_FOCUS=772 make test-e2e # only runs the test for issue 772
264
264
# HNC_FOCUS=Quickstart make test-e2e # Runs all tests in the "Quickstart" Describe block
265
265
.PHONY : test-e2e
266
- test-e2e : exclude-system-namespaces
266
+ test-e2e : warn-hnc-repair exclude-system-namespaces
267
267
go clean -testcache
268
268
ifndef HNC_FOCUS
269
269
go test -v -timeout 0 ./test/e2e/...
@@ -274,14 +274,21 @@ endif
274
274
# This batch test will run e2e tests N times on the current cluster the user
275
275
# deployed (either kind or a kubernetes cluster), e.g. "make test-e2e-batch N=10"
276
276
.PHONY : test-e2e-batch
277
- test-e2e-batch : exclude-system-namespaces
277
+ test-e2e-batch : warn-hnc-repair exclude-system-namespaces
278
278
number=1 ; while [[ $$ number -le $N ]] ; do \
279
279
echo $$ number ; \
280
280
((number = number + 1)) ; \
281
281
go clean -testcache ; \
282
282
go test -v -timeout 0 ./test/e2e/... ; \
283
283
done
284
284
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
+
285
292
# exclude-system-namespaces is called before we run any e2e tests. We do ensure
286
293
# the system namespaces are excluded in the "deploy" target. However, we need to
287
294
# do it here too in case users install HNC by applying manifests. Ensuring the
@@ -298,14 +305,28 @@ exclude-system-namespaces:
298
305
@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"
299
306
@echo " after HNC is first deployed in a cluster."
300
307
@echo
308
+
309
+ warn-hnc-repair :
310
+ @echo " ************************************************************"
301
311
ifndef HNC_REPAIR
302
- @echo "******************************************************"
303
312
@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 "******************************************************"
306
313
@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."
308
324
endif
325
+ @echo
326
+ @echo "You have 3s to hit Ctrl-C to cancel..."
327
+ @echo "************************************************************"
328
+ @echo
329
+ @sleep 3
309
330
310
331
# ##################### RELEASE ACTIONS #########################
311
332
# Build the container image by Cloud Build and build YAMLs locally
0 commit comments