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

Commit 0ffea4c

Browse files
committed
Backport all e2e tests to HNC v0.5
Right now, the e2e tests at HEAD all work on HNC v0.5.1, but this won't be true for long. This change mass-imports all tests expected to work on v0.5.1 so they can live together on the same branch. Tested: all tests pass on HNC v0.5.1-rc1 on GKE 1.16.
1 parent e6946d0 commit 0ffea4c

22 files changed

+639
-734
lines changed

Diff for: incubator/hnc/Makefile

+21-7
Original file line numberDiff line numberDiff line change
@@ -182,14 +182,28 @@ kind-deploy:
182182
CONFIG=kind $(MAKE) deploy
183183

184184
###################### E2E TEST #########################
185-
185+
# This test will run on the current cluster the user deployed (either kind or a
186+
# kubernetes cluster).
187+
#
188+
# Note the `-timeout 0` that's passed to the `go test` command - by default, a
189+
# Go test suite has a 10m timeout, and the flag disables that timeout (as of
190+
# July 2020, these tests take ~15m and that number is expected to grow).
186191
.PHONY: e2e-test
187-
e2e-test: deploy
188-
go test ./e2e/...
189-
190-
.PHONY: local-e2e-test
191-
local-e2e-test: kind-deploy
192-
go test ./e2e/...
192+
e2e-test:
193+
@echo
194+
@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"
195+
@echo "after HNC is first deployed in a cluster."
196+
@echo
197+
ifndef HNC_REPAIR
198+
@echo "******************************************************"
199+
@echo "HNC_REPAIR IS NOT SET. CRITICAL TESTS WILL BE SKIPPED."
200+
@echo "You have 5s to hit Ctrl-C to cancel and try again."
201+
@echo "******************************************************"
202+
@echo
203+
@sleep 5
204+
endif
205+
go clean -testcache
206+
go test -v -timeout 0 ./test/...
193207

194208
###################### RELEASE ACTIONS #########################
195209
# Build the container image by Cloud Build and build YAMLs locally

Diff for: incubator/hnc/e2e/tests/namespace_test.go

-66
This file was deleted.

Diff for: incubator/hnc/e2e/tests/subnamespace_test.go

-50
This file was deleted.

Diff for: incubator/hnc/hack/test-delete-anchor-crd.sh

-29
This file was deleted.

Diff for: incubator/hnc/hack/test-delete-hc-and-anchor-crd.sh

-47
This file was deleted.

Diff for: incubator/hnc/hack/test-delete-hc-crd.sh

-43
This file was deleted.

Diff for: incubator/hnc/hack/test-issue-328.sh

-46
This file was deleted.

0 commit comments

Comments
 (0)