@@ -9,6 +9,7 @@ export IMAGE_VERSION = v1.9.0
9
9
export SIMPLE_VERSION = $(shell (test "$(shell git describe) " = "$(shell git describe --abbrev=0) " && echo $(shell git describe) ) || echo $(shell git describe --abbrev=0) +git)
10
10
export GIT_VERSION = $(shell git describe --dirty --tags --always)
11
11
export GIT_COMMIT = $(shell git rev-parse HEAD)
12
+ # TODO: bump this to 1.21, after kubectl `--generator` flag is removed from e2e tests.
12
13
export K8S_VERSION = 1.20.2
13
14
14
15
# Build settings
@@ -144,16 +145,13 @@ e2e_targets := test-e2e $(e2e_tests)
144
145
145
146
.PHONY : test-e2e-setup
146
147
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)
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
149
151
$(SCRIPTS_DIR ) /fetch kind 0.11.0
150
152
$(SCRIPTS_DIR ) /fetch kubectl $(K8S_VERSION ) # Install kubectl AFTER envtest because envtest includes its own kubectl binary
151
153
[[ " ` $( TOOLS_DIR) /kind get clusters` " =~ " $( KIND_CLUSTER) " ]] || $(TOOLS_DIR ) /kind create cluster --image=" kindest/node:v$( K8S_VERSION) " --name $(KIND_CLUSTER )
152
154
153
- # install envtest binary
154
- envtest :
155
- go install sigs.k8s.io/controller-runtime/tools/setup-envtest@latest
156
-
157
155
.PHONY : test-e2e-teardown
158
156
test-e2e-teardown :
159
157
$(SCRIPTS_DIR ) /fetch kind 0.11.0
@@ -163,8 +161,8 @@ test-e2e-teardown:
163
161
# Double colon rules allow repeated rule declarations.
164
162
# Repeated rules are executed in the order they appear.
165
163
$(e2e_targets ) :: test-e2e-setup image/scorecard-test
166
-
167
164
test-e2e :: $(e2e_tests ) # # Run e2e tests
165
+
168
166
test-e2e-go :: image/custom-scorecard-tests # # Run Go e2e tests
169
167
go test ./test/e2e/go -v -ginkgo.v
170
168
test-e2e-ansible :: image/ansible-operator # # Run Ansible e2e tests
0 commit comments