Skip to content

Commit 63a24e9

Browse files
fix envtest location in makefile
Signed-off-by: varshaprasad96 <[email protected]>
1 parent b656934 commit 63a24e9

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

Makefile

+5-3
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export IMAGE_VERSION = v1.9.0
99
export SIMPLE_VERSION = $(shell (test "$(shell git describe)" = "$(shell git describe --abbrev=0)" && echo $(shell git describe)) || echo $(shell git describe --abbrev=0)+git)
1010
export GIT_VERSION = $(shell git describe --dirty --tags --always)
1111
export GIT_COMMIT = $(shell git rev-parse HEAD)
12-
export K8S_VERSION = 1.20.2
12+
export K8S_VERSION = 1.21.2
1313

1414
# Build settings
1515
export TOOLS_DIR = tools/bin
@@ -144,7 +144,7 @@ e2e_targets := test-e2e $(e2e_tests)
144144

145145
.PHONY: test-e2e-setup
146146
export KIND_CLUSTER := operator-sdk-e2e
147-
export KUBEBUILDER_ASSETS=$(shell $(shell go env GOPATH)/bin/setup-envtest use $(K8S_VERSION) --bin-dir tools/bin/ -p path)
147+
148148
test-e2e-setup: build envtest
149149
$(SCRIPTS_DIR)/fetch kind 0.11.0
150150
$(SCRIPTS_DIR)/fetch kubectl $(K8S_VERSION) # Install kubectl AFTER envtest because envtest includes its own kubectl binary
@@ -164,7 +164,9 @@ test-e2e-teardown:
164164
# Repeated rules are executed in the order they appear.
165165
$(e2e_targets):: test-e2e-setup image/scorecard-test
166166

167-
test-e2e:: $(e2e_tests) ## Run e2e tests
167+
test-e2e:: $(e2e_tests)
168+
test-e2e:: KUBEBUILDER_ASSETS = $(shell $(shell go env GOPATH)/bin/setup-envtest use $(K8S_VERSION) --bin-dir tools/bin/ -p path)
169+
168170
test-e2e-go:: image/custom-scorecard-tests ## Run Go e2e tests
169171
go test ./test/e2e/go -v -ginkgo.v
170172
test-e2e-ansible:: image/ansible-operator ## Run Ansible e2e tests

0 commit comments

Comments
 (0)