|
@@ -35,6 +35,8 @@ else
|
|
|
GOBIN=$(shell go env GOBIN)
|
|
GOBIN=$(shell go env GOBIN)
|
|
|
endif
|
|
endif
|
|
|
|
|
|
|
|
|
|
+KUBERNETES_VERSION := '1.24.x'
|
|
|
|
|
+
|
|
|
# check if there are any existing `git tag` values
|
|
# check if there are any existing `git tag` values
|
|
|
ifeq ($(shell git tag),)
|
|
ifeq ($(shell git tag),)
|
|
|
# no tags found - default to initial tag `v0.0.0`
|
|
# no tags found - default to initial tag `v0.0.0`
|
|
@@ -91,6 +93,7 @@ update-deps:
|
|
|
# Golang
|
|
# Golang
|
|
|
|
|
|
|
|
.PHONY: test
|
|
.PHONY: test
|
|
|
|
|
+test: export KUBEBUILDER_ASSETS := $(shell setup-envtest use $(KUBERNETES_VERSION) -p path --os $(shell go env GOOS) --arch $(shell go env GOARCH))
|
|
|
test: generate ## Run tests
|
|
test: generate ## Run tests
|
|
|
@$(INFO) go test unit-tests
|
|
@$(INFO) go test unit-tests
|
|
|
go test -race -v $(shell go list ./... | grep -v e2e) -coverprofile cover.out
|
|
go test -race -v $(shell go list ./... | grep -v e2e) -coverprofile cover.out
|