You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
🌱 update unit test gha to test against the k8s version of client-go (#3272)
* add setup-envtest to tools
Signed-off-by: Per Goncalves da Silva <[email protected]>
* pin setup_envtest environment to client-go version
Signed-off-by: Per Goncalves da Silva <[email protected]>
* make installplan test case more robust to update conflict errors
Signed-off-by: Per Goncalves da Silva <[email protected]>
* fix subscription e2e test flake
Signed-off-by: Per Goncalves da Silva <[email protected]>
---------
Signed-off-by: Per Goncalves da Silva <[email protected]>
Co-authored-by: Per Goncalves da Silva <[email protected]>
# Phony prerequisite for targets that rely on the go build cache to determine staleness.
@@ -63,24 +67,12 @@ vet:
63
67
all: test build
64
68
65
69
test: clean cover.out
66
-
67
-
unit: kubebuilder
70
+
.PHONY: unit
71
+
KUBEBUILDER_ASSETS ?= $(shell$(SETUP_ENVTEST) use -p path $(ENVTEST_KUBE_VERSION))
72
+
unit:
73
+
@echo "Running unit tests with setup_envtest for kubernetes $(ENVTEST_KUBE_VERSION)"
68
74
KUBEBUILDER_ASSETS=$(KUBEBUILDER_ASSETS) go test$(MOD_FLAGS)$(SPECIFIC_UNIT_TEST) -tags "json1" -race -count=1 ./pkg/... ./test/e2e/split/...
69
75
70
-
# Ensure kubectl installed before continuing
71
-
KUBEBUILDER_ASSETS_ERR := not detected in $(KUBEBUILDER_ASSETS), to override the assets path set the KUBEBUILDER_ASSETS environment variable, for install instructions see https://pkg.go.dev/sigs.k8s.io/controller-runtime/tools/setup-envtest
0 commit comments