Skip to content

Commit 9bb4bdb

Browse files
committed
Ensure gateway CRDs are installed when running test-cel-validation
1 parent 45302dc commit 9bb4bdb

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tests/Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ EXPERIMENTAL_CONFORMANCE_PROFILES = GATEWAY-TLS
1818
CONFORMANCE_PROFILES = $(STANDARD_CONFORMANCE_PROFILES) # by default we use the standard conformance profiles. If experimental is enabled we override this and add the experimental profiles.
1919
SKIP_TESTS =
2020
CEL_TEST_TARGET =
21+
BRANCH = ?= main
2122

2223
# Check if ENABLE_EXPERIMENTAL is true
2324
ifeq ($(ENABLE_EXPERIMENTAL),true)
@@ -172,7 +173,7 @@ HELM_PARAMETERS += --set nginxGateway.name=nginx-gateway --set nginx.service.typ
172173
# it overrides the target in the main Makefile when the GW_API_VERSION is set to main
173174
ifeq ($(GW_API_VERSION),main)
174175
install-gateway-crds:
175-
kubectl kustomize "https://github.com/kubernetes-sigs/gateway-api/config/crd/$(if $(filter true,$(ENABLE_EXPERIMENTAL)),experimental,)?timeout=120&ref=main" | kubectl apply -f -
176+
kubectl kustomize "https://github.com/kubernetes-sigs/gateway-api/config/crd/$(if $(filter true,$(ENABLE_EXPERIMENTAL)),experimental,)?timeout=120&ref=$(BRANCH)" | kubectl apply -f -
176177
endif
177178

178179
.PHONY: install-ngf-local-no-build
@@ -191,6 +192,7 @@ uninstall-ngf: ## Uninstall NGF on configured kind cluster
191192
# Run CEL validation integration tests against a real cluster
192193
.PHONY: test-cel-validation
193194
test-cel-validation:
195+
-make install-gateway-crds || true;
194196
@if [ -z "$(CEL_TEST_TARGET)" ]; then \
195197
echo "Running all tests in ./cel"; \
196198
go test -v ./cel; \

0 commit comments

Comments
 (0)