File tree 2 files changed +5
-2
lines changed
2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -20,5 +20,4 @@ GoTest:
20
20
stage : test
21
21
image : golang:1.16
22
22
script :
23
- - cp -r chart/drupalsite-operator/runtime-config/ /tmp/
24
23
- make test
Original file line number Diff line number Diff line change @@ -29,12 +29,16 @@ all: manager
29
29
30
30
# Run tests
31
31
ENVTEST := $(shell pwd) /bin/setup-envtest
32
+ # ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary.
32
33
ENVTEST_K8S_VERSION = 1.21
33
- setup-envtest-bin : # # Download setup-envtest locally if necessary
34
+ # Download setup-envtest locally if necessary
35
+ setup-envtest-bin :
34
36
$(call go-get-tool,$(ENVTEST ) ,sigs.k8s.io/controller-runtime/tools/setup-envtest@latest)
35
37
$(ENVTEST ) use ${ENVTEST_K8S_VERSION}
36
38
39
+ # Copy runtime config to /tmp and setup envtest assets before running the tests
37
40
test : setup-envtest-bin
41
+ cp -r chart/drupalsite-operator/runtime-config/ /tmp/
38
42
source <( ${ENVTEST} use -p env ${ENVTEST_K8S_VERSION} ) ; go test ./... -coverprofile cover.out -v
39
43
40
44
# Build manager binary
You can’t perform that action at this time.
0 commit comments