Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ unit-test: ## Run unit tests

ENVTEST_ASSETS_DIR=$(CWD)/testbin
OPENSHIFT_CI ?= false
test: ## Run integration tests.
test: setup-envtest-bin ## Run integration tests.
ifeq ($(OPENSHIFT_CI), true)
@echo "Running in OpenShift CI. Syncing vendor"
go mod tidy && go mod vendor
Expand All @@ -66,8 +66,7 @@ else
endif
make manifests generate fmt vet
mkdir -p ${ENVTEST_ASSETS_DIR}
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
source ${ENVTEST_ASSETS_DIR}/setup-envtest.sh; fetch_envtest_tools $(ENVTEST_ASSETS_DIR); setup_envtest_env $(ENVTEST_ASSETS_DIR); go test ./tests/integration/... -v -tags integration -coverprofile integration-cover.out
source <($(SETUP_ENVTEST_BIN) use -i -p env 1.21.x); go test ./tests/integration/... -v -tags integration -coverprofile integration-cover.out

##@ Build

Expand Down
5 changes: 5 additions & 0 deletions hack/make/tools.mk
Original file line number Diff line number Diff line change
Expand Up @@ -73,3 +73,8 @@ endif
KUBELINTER_BIN := $(CWD)/bin/kube-linter
kubelinter-bin: ## Download kube-linter locally if necessary
$(call go-get-tool,$(KUBELINTER_BIN),golang.stackrox.io/kube-linter/cmd/[email protected])

.PHONY: setup-envtest-bin
SETUP_ENVTEST_BIN := $(CWD)/bin/setup-envtest
setup-envtest-bin: ## Download setup-envtest locally if necessary
$(call go-get-tool,$(SETUP_ENVTEST_BIN),sigs.k8s.io/controller-runtime/tools/setup-envtest@latest)