Skip to content

Commit f9914e7

Browse files
committed
Use alternative Ginkgo invocation
This prevents warnings of version mismatch between installed ginkgo CLI and ginkgo version used in tests.
1 parent 8c9e107 commit f9914e7

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

Makefile

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,11 @@ unit-tests::vuln
6565
unit-tests::manifests
6666
unit-tests::just-unit-tests ## Run unit tests
6767

68+
GINKGO ?= go run github.com/onsi/ginkgo/v2/ginkgo
69+
6870
.PHONY: just-unit-tests
6971
just-unit-tests:
70-
ginkgo -r --randomize-all api/ internal/ pkg/
72+
$(GINKGO) -r --randomize-all api/ internal/ pkg/
7173

7274
.PHONY: integration-tests
7375
integration-tests::install-tools
@@ -81,7 +83,7 @@ integration-tests::just-integration-tests ## Run integration tests
8183

8284
.PHONY: just-integration-tests
8385
just-integration-tests:
84-
ginkgo -r controllers/
86+
$(GINKGO) -r controllers/
8587

8688
manifests: install-tools ## Generate manifests e.g. CRD, RBAC etc.
8789
controller-gen crd rbac:roleName=operator-role paths="./api/...;./controllers/..." output:crd:artifacts:config=config/crd/bases
@@ -232,7 +234,7 @@ cert-manager-rm:
232234
kubectl delete -f https://github.com/cert-manager/cert-manager/releases/download/v$(CERT_MANAGER_VERSION)/cert-manager.yaml --ignore-not-found
233235

234236
system-tests: install-tools ## Run end-to-end tests against Kubernetes cluster defined in ~/.kube/config
235-
NAMESPACE="$(SYSTEM_TEST_NAMESPACE)" K8S_OPERATOR_NAMESPACE="$(K8S_OPERATOR_NAMESPACE)" ginkgo -nodes=3 --randomize-all -r system_tests/
237+
NAMESPACE="$(SYSTEM_TEST_NAMESPACE)" K8S_OPERATOR_NAMESPACE="$(K8S_OPERATOR_NAMESPACE)" $(GINKGO) -nodes=3 --randomize-all -r system_tests/
236238

237239
kubectl-plugin-tests: ## Run kubectl-rabbitmq tests
238240
@echo "running kubectl plugin tests"

0 commit comments

Comments
 (0)