From c30762dafc6e58188d003c64db5620cd463ac8d7 Mon Sep 17 00:00:00 2001 From: HarshwardhanPatil07 Date: Wed, 2 Sep 2026 14:55:18 +0530 Subject: [PATCH] Makefile: Quote RUN test filters Regular expressions containing alternation are currently interpreted by the shell as pipelines because RUN is expanded without quoting. Quote the filter passed to go test in both the unit and e2e targets so normal Go test regular expressions work without escaping. Closes: https://github.com/bootc-dev/bootc-operator/issues/156 Assisted-by: AI Signed-off-by: HarshwardhanPatil07 --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 8ceb1ed..c235e70 100644 --- a/Makefile +++ b/Makefile @@ -49,7 +49,7 @@ vet: ## Run go vet against code. .PHONY: unit unit: manifests generate setup-envtest ## Run unit tests (envtest). V=1 for verbose. RUN= to filter. - KUBEBUILDER_ASSETS="$(shell "$(ENVTEST)" use $(ENVTEST_K8S_VERSION) --bin-dir "$(LOCALBIN)" -p path)" go test $(if $(V),-v) $(if $(RUN),-run $(RUN)) $$(go list ./... | grep -v /test/e2e) + KUBEBUILDER_ASSETS="$(shell "$(ENVTEST)" use $(ENVTEST_K8S_VERSION) --bin-dir "$(LOCALBIN)" -p path)" go test $(if $(V),-v) $(if $(RUN),-run '$(RUN)') $$(go list ./... | grep -v /test/e2e) .PHONY: lint lint: golangci-lint ## Run golangci-lint linter and go-lines @@ -85,7 +85,7 @@ e2e: ## Run e2e tests (requires: make deploy-bink). V=1 for verbose. RUN= ARTIFACTS=$(ARTIFACTS) \ BINK_NODE_IMAGE_DIGEST=$$(skopeo inspect --tls-verify=false --format '{{.Digest}}' docker://localhost:5000/node:latest) \ BINK_NODE_IMAGE_UPDATE_DIGEST=$$(skopeo inspect --tls-verify=false docker://localhost:5000/node:update | jq -r '.Digest') \ - go test -timeout 30m -count=1 $(if $(V),-v) $(if $(RUN),-run $(RUN)) . + go test -timeout 30m -count=1 $(if $(V),-v) $(if $(RUN),-run '$(RUN)') . ##@ Build