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
# Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set)
16
17
ifeq (,$(shell go env GOBIN))
@@ -25,7 +26,6 @@ endif
25
26
SHELL = /usr/bin/env bash -o pipefail
26
27
.SHELLFLAGS = -ec
27
28
28
-
ENVTEST_ASSETS_DIR=$(shell pwd)/testbin
29
29
KIND_CLUSTER_CONFIG_DIR=$(shell pwd)/config/kind
30
30
KUBECONFIG_BACKUP_DIR=$(shell pwd)/.kube
31
31
@@ -81,10 +81,8 @@ fmt: ## Run go fmt against code.
81
81
vet: ## Run go vet against code.
82
82
go vet ./...
83
83
84
-
test: manifests generate fmt vet ## Run tests.
85
-
mkdir -p ${ENVTEST_ASSETS_DIR}
86
-
test -f ${ENVTEST_ASSETS_DIR}/setup-envtest.sh || curl -sSLo ${ENVTEST_ASSETS_DIR}/setup-envtest.sh https://raw.githubusercontent.com/kubernetes-sigs/controller-runtime/v0.8.3/hack/setup-envtest.sh
87
-
source${ENVTEST_ASSETS_DIR}/setup-envtest.sh; fetch_envtest_tools $(ENVTEST_ASSETS_DIR); setup_envtest_env $(ENVTEST_ASSETS_DIR); go test ./... -coverprofile cover.out
84
+
test: manifests generate fmt vet setup-envtest ## Run tests.
85
+
KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use -p path $(ENVTEST_K8S_VERSION))" go test ./... -coverprofile cover.out
0 commit comments