@@ -9,6 +9,7 @@ export IMAGE_VERSION = v1.9.0
99export SIMPLE_VERSION = $(shell (test "$(shell git describe) " = "$(shell git describe --abbrev=0) " && echo $(shell git describe) ) || echo $(shell git describe --abbrev=0) +git)
1010export GIT_VERSION = $(shell git describe --dirty --tags --always)
1111export GIT_COMMIT = $(shell git rev-parse HEAD)
12+ # TODO: bump this to 1.21, after kubectl `--generator` flag is removed from e2e tests.
1213export K8S_VERSION = 1.20.2
1314
1415# Build settings
@@ -144,16 +145,13 @@ e2e_targets := test-e2e $(e2e_tests)
144145
145146.PHONY : test-e2e-setup
146147export 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)
148- test-e2e-setup : build envtest
148+
149+ export KUBEBUILDER_ASSETS = $(PWD ) /$(shell go install sigs.k8s.io/controller-runtime/tools/setup-envtest@latest && $(shell go env GOPATH) /bin/setup-envtest use $(K8S_VERSION ) --bin-dir tools/bin/ -p path)
150+ test-e2e-setup : build
149151 $(SCRIPTS_DIR ) /fetch kind 0.11.0
150152 $(SCRIPTS_DIR ) /fetch kubectl $(K8S_VERSION ) # Install kubectl AFTER envtest because envtest includes its own kubectl binary
151153 [[ " ` $( TOOLS_DIR) /kind get clusters` " =~ " $( KIND_CLUSTER) " ]] || $(TOOLS_DIR ) /kind create cluster --image=" kindest/node:v$( K8S_VERSION) " --name $(KIND_CLUSTER )
152154
153- # install envtest binary
154- envtest :
155- go install sigs.k8s.io/controller-runtime/tools/setup-envtest@latest
156-
157155.PHONY : test-e2e-teardown
158156test-e2e-teardown :
159157 $(SCRIPTS_DIR ) /fetch kind 0.11.0
@@ -163,8 +161,8 @@ test-e2e-teardown:
163161# Double colon rules allow repeated rule declarations.
164162# Repeated rules are executed in the order they appear.
165163$(e2e_targets ) :: test-e2e-setup image/scorecard-test
166-
167164test-e2e :: $(e2e_tests ) # # Run e2e tests
165+
168166test-e2e-go :: image/custom-scorecard-tests # # Run Go e2e tests
169167 go test ./test/e2e/go -v -ginkgo.v
170168test-e2e-ansible :: image/ansible-operator # # Run Ansible e2e tests
0 commit comments