Skip to content

Commit

Permalink
Fix the envtest target in the makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
nickytd committed May 28, 2024
1 parent 0035c87 commit 6f5b33c
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,6 @@ TOOLS_DIR := $(REPO_ROOT)/hack/tools
TOOLS_DIR_BIN := $(TOOLS_DIR)/bin
include $(REPO_ROOT)/hack/tools.mk

KUBEBUILDER_ASSETS := $(shell $(TOOLS_DIR_BIN)/setup-envtest use $(ENVTEST_K8S_VERSION) \
--bin-dir=$(TOOLS_DIR_BIN) -i -p env 2>/dev/null || true)

.DEFAULT_GOAL := all
#####################################################################
# Rules for verification, formatting, linting, testing and cleaning #
Expand Down Expand Up @@ -83,7 +80,7 @@ test: $(MOCKGEN)

.PHONY: envtest
envtest: $(SETUP_ENVTEST)
@$(KUBEBUILDER_ASSETS) && go test $(REPO_ROOT)/test/... --ginkgo.v -timeout 10m
@KUBEBUILDER_ASSETS=$(shell $(TOOLS_DIR_BIN)/setup-envtest use $(ENVTEST_K8S_VERSION) --bin-dir=$(TOOLS_DIR_BIN) -i -p path 2>/dev/null || true) go test $(REPO_ROOT)/test/... --ginkgo.v -timeout 10m

.PHONY: add-license-headers
add-license-headers: $(GO_ADD_LICENSE)
Expand All @@ -97,4 +94,4 @@ add-license-headers: $(GO_ADD_LICENSE)
docker-images:
@docker buildx build --push --platform=$(PLATFORM) --build-arg LD_FLAGS="$(LD_FLAGS)" \
-t $(IMAGE_PREFIX)/$(NAME):$(VERSION) -t $(IMAGE_PREFIX)/$(NAME):latest \
-f Dockerfile .
-f Dockerfile .

0 comments on commit 6f5b33c

Please sign in to comment.