You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Configure ENVTEST Binaries for IDE Debugging (#1454)
This change introduces downloading the specific binaries required to run ENVTEST-based tests into the project/bin directory. This setup makes it easier to configure tests for debugging directly in an IDE.
Furthermore, no longer install binaries required for ENVTEST based tests on the project/bin instead of global path.
go test -count=1 -v ./test/extension-developer-e2e/...
160
160
161
-
.PHONY: test-unit
162
161
ENVTEST_VERSION := $(shell go list -m k8s.io/client-go | cut -d" " -f2 | sed 's/^v0\.\([[:digit:]]\{1,\}\)\.[[:digit:]]\{1,\}$$/1.\1.x/')
163
162
UNIT_TEST_DIRS := $(shell go list ./... | grep -v /test/)
164
163
COVERAGE_UNIT_DIR := $(ROOT_DIR)/coverage/unit
165
-
test-unit: $(SETUP_ENVTEST)#HELP Run the unit tests
164
+
165
+
.PHONY: envtest-k8s-bins #HELP Uses setup-envtest to download and install the binaries required to run ENVTEST-test based locally at the project/bin directory.
166
+
envtest-k8s-bins: $(SETUP_ENVTEST)
167
+
mkdir -p $(ROOT_DIR)/bin
168
+
$(SETUP_ENVTEST) use -p env $(ENVTEST_VERSION)$(SETUP_ENVTEST_BIN_DIR_OVERRIDE)
169
+
170
+
.PHONY: test-unit
171
+
test-unit: $(SETUP_ENVTEST) envtest-k8s-bins #HELP Run the unit tests
0 commit comments