Add recording target to the Taskfile
@@ -289,10 +289,18 @@ tasks:
deps: [controller:run-kustomize-for-envtest]
cmds:
# -race fails at the moment in controller-runtime
- - go test -timeout 15m -run '{{default ".*" .TEST_FILTER}}' {{.VERBOSE}} ./internal/controllers
+ - go test -timeout {{.TIMEOUT}} -run '{{default ".*" .TEST_FILTER}}' {{.VERBOSE}} ./internal/controllers
vars:
VERBOSE:
sh: if [ $TEST_FILTER ]; then echo "-v"; fi
+ TIMEOUT: '{{default "15m" .TIMEOUT}}'
+
+ # This target is intended for local use only
+ controller:test-integration-envtest-record:
+ desc: Run integration tests with envtest with a longer timeout suitable for recording the tests.
+ cmds:
+ - task: controller:test-integration-envtest
+ vars: {TIMEOUT: '{{.LIVE_TEST_TIMEOUT}}'}
controller:test-integration-envtest-cover:
desc: Run integration tests with envtest using record/replay and output coverage.
