File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -186,4 +186,5 @@ tasks:
186186 cmds :
187187 - ' GOBIN="{{.LOCALBIN}}" go install sigs.k8s.io/controller-runtime/tools/setup-envtest@{{.ENVTEST_VERSION}}'
188188 - echo -n "{{.ENVTEST_VERSION}}" > {{.LOCALBIN}}/envtest_version
189+ - ' {{.ROOT_DIR}}/bin/setup-envtest use {{.ENVTEST_K8S_VERSION}} -p path > {{.LOCALBIN}}/assets_path'
189190 internal : true
Original file line number Diff line number Diff line change @@ -23,13 +23,17 @@ tasks:
2323 test :
2424 desc : " Run all tests."
2525 run : once
26+ vars :
27+ ENVTEST_K8S_VERSION : ' {{ env "ENVTEST_K8S_VERSION" | default ( .ENVTEST_K8S_VERSION | default "1.30.0" ) }}'
28+ KUBEBUILDER_ASSETS :
29+ sh : ' (test -f {{.LOCALBIN}}/assets_path && cat {{.LOCALBIN}}/assets_path) || echo ""'
2630 requires :
2731 vars :
2832 - CODE_DIRS
2933 deps :
3034 - test-envtest-dep
3135 cmds :
32- - ' PROJECT_ROOT="{{.ROOT_DIR2}}" NESTED_MODULES="{{.NESTED_MODULES}}" {{.TASKFILE_DIR2}}/run-tests.sh {{.CODE_DIRS}}'
36+ - ' PROJECT_ROOT="{{.ROOT_DIR2}}" NESTED_MODULES="{{.NESTED_MODULES}}" KUBEBUILDER_ASSETS="{{.KUBEBUILDER_ASSETS}}" ENVTEST_K8S_VERSION="{{.ENVTEST_K8S_VERSION}}" {{.TASKFILE_DIR2}}/run-tests.sh {{.CODE_DIRS}}'
3337
3438 test-envtest-dep :
3539 desc : " Install the envtest dependency, if marked as required."
You can’t perform that action at this time.
0 commit comments