File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed
Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -53,6 +53,14 @@ You can run the test suite by simply doing
5353make test
5454```
5555
56+ ### Additional test configuration
57+
58+ By setting the ` GO_TEST_ARGS ` environment variable you can pass additional flags to [ ` go test ` ] ( https://pkg.go.dev/cmd/go#hdr-Test_packages ) :
59+
60+ ``` sh
61+ make test GO_TEST_ARGS=" -v -run=TestReadIgnoreFile/with_domain"
62+ ```
63+
5664## How to run the controller locally
5765
5866Install the controller's CRDs on your test cluster:
Original file line number Diff line number Diff line change @@ -6,6 +6,9 @@ TAG ?= latest
66LIBGIT2_IMG ?= ghcr.io/fluxcd/golang-with-libgit2
77LIBGIT2_TAG ?= libgit2-1.3.1
88
9+ # Allows for defining additional Go test args, e.g. '-tags integration'.
10+ GO_TEST_ARGS ?=
11+
912# Allows for defining additional Docker buildx arguments,
1013# e.g. '--push'.
1114BUILD_ARGS ?=
@@ -97,7 +100,10 @@ KUBEBUILDER_ASSETS?="$(shell $(ENVTEST) --arch=$(ENVTEST_ARCH) use -i $(ENVTEST_
97100test : $(LIBGIT2 ) install-envtest test-api check-deps # # Run tests
98101 KUBEBUILDER_ASSETS=$(KUBEBUILDER_ASSETS ) \
99102 GIT_CONFIG_GLOBAL=/dev/null \
100- go test $(GO_STATIC_FLAGS ) ./... -coverprofile cover.out
103+ go test $(GO_STATIC_FLAGS ) \
104+ ./... \
105+ $(GO_TEST_ARGS ) \
106+ -coverprofile cover.out
101107
102108check-deps :
103109ifeq ($(shell uname -s) ,Darwin)
You can’t perform that action at this time.
0 commit comments