Skip to content

Commit 8eb898b

Browse files
authored
chore: make conformance test args configurable (#7571)
Signed-off-by: zirain <[email protected]>
1 parent ff13742 commit 8eb898b

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

tools/make/kube.mk

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ E2E_TIMEOUT ?= 20m
3636
# E2E_REDIRECT allow you specified a redirect when run e2e test locally, e.g. `>> test_output.out 2>&1`
3737
E2E_REDIRECT ?=
3838
E2E_TEST_ARGS ?= -v -tags e2e -timeout $(E2E_TIMEOUT)
39+
# If you want to skip crds version check, add `--allow-crds-mismatch` to E2E_TEST_SUITE_ARGS
40+
E2E_TEST_SUITE_ARGS ?= --debug=true
3941

4042
CONFORMANCE_RUN_TEST ?=
4143
CONFORMANCE_TEST_ARGS ?= -v -tags conformance -timeout $(E2E_TIMEOUT)
@@ -272,17 +274,17 @@ setup-mac-net-connect:
272274
run-e2e: ## Run e2e tests
273275
@$(LOG_TARGET)
274276
ifeq ($(E2E_RUN_TEST),)
275-
go test $(E2E_TEST_ARGS) ./test/e2e --gateway-class=envoy-gateway --debug=true --cleanup-base-resources=false $(E2E_REDIRECT)
276-
go test $(E2E_TEST_ARGS) ./test/e2e/merge_gateways --gateway-class=merge-gateways --debug=true --cleanup-base-resources=false
277-
go test $(E2E_TEST_ARGS) ./test/e2e/multiple_gc --debug=true --cleanup-base-resources=true
278-
LAST_VERSION_TAG=$(shell cat VERSION) go test $(E2E_TEST_ARGS) ./test/e2e/upgrade --gateway-class=upgrade --debug=true --cleanup-base-resources=$(E2E_CLEANUP)
277+
go test $(E2E_TEST_ARGS) ./test/e2e $(E2E_TEST_SUITE_ARGS) --gateway-class=envoy-gateway --cleanup-base-resources=false $(E2E_REDIRECT)
278+
go test $(E2E_TEST_ARGS) ./test/e2e/merge_gateways $(E2E_TEST_SUITE_ARGS) --gateway-class=merge-gateways --cleanup-base-resources=false
279+
go test $(E2E_TEST_ARGS) ./test/e2e/multiple_gc $(E2E_TEST_SUITE_ARGS) --cleanup-base-resources=true
280+
LAST_VERSION_TAG=$(shell cat VERSION) go test $(E2E_TEST_ARGS) ./test/e2e/upgrade $(E2E_TEST_SUITE_ARGS) --gateway-class=upgrade --cleanup-base-resources=$(E2E_CLEANUP)
279281
else
280-
go test $(E2E_TEST_ARGS) ./test/e2e --gateway-class=envoy-gateway --debug=true --cleanup-base-resources=$(E2E_CLEANUP) \
282+
go test $(E2E_TEST_ARGS) ./test/e2e $(E2E_TEST_SUITE_ARGS) --gateway-class=envoy-gateway --cleanup-base-resources=$(E2E_CLEANUP) \
281283
--run-test $(E2E_RUN_TEST) $(E2E_REDIRECT)
282284
endif
283285

284286
run-e2e-upgrade:
285-
go test $(E2E_TEST_ARGS) ./test/e2e/upgrade --gateway-class=upgrade --debug=true --cleanup-base-resources=$(E2E_CLEANUP)
287+
go test $(E2E_TEST_ARGS) ./test/e2e/upgrade $(E2E_TEST_SUITE_ARGS) --gateway-class=upgrade --cleanup-base-resources=$(E2E_CLEANUP)
286288

287289
.PHONY: run-resilience
288290
run-resilience: ## Run resilience tests
@@ -351,9 +353,9 @@ run-conformance: prepare-ip-family ## Run Gateway API conformance.
351353
kubectl wait --timeout=$(WAIT_TIMEOUT) -n envoy-gateway-system deployment/envoy-gateway --for=condition=Available
352354
kubectl apply -f test/config/gatewayclass.yaml
353355
ifeq ($(CONFORMANCE_RUN_TEST),)
354-
go test $(CONFORMANCE_TEST_ARGS) ./test/conformance --gateway-class=envoy-gateway --debug=true $(E2E_REDIRECT)
356+
go test $(CONFORMANCE_TEST_ARGS) ./test/conformance $(E2E_TEST_SUITE_ARGS) --gateway-class=envoy-gateway $(E2E_REDIRECT)
355357
else
356-
go test $(CONFORMANCE_TEST_ARGS) ./test/conformance --gateway-class=envoy-gateway --debug=true --run-test $(CONFORMANCE_RUN_TEST) $(E2E_REDIRECT)
358+
go test $(CONFORMANCE_TEST_ARGS) ./test/conformance $(E2E_TEST_SUITE_ARGS) --gateway-class=envoy-gateway --run-test $(CONFORMANCE_RUN_TEST) $(E2E_REDIRECT)
357359
endif
358360

359361
CONFORMANCE_REPORT_PATH ?=
@@ -364,13 +366,13 @@ run-experimental-conformance: prepare-ip-family ## Run Experimental Gateway API
364366
kubectl wait --timeout=$(WAIT_TIMEOUT) -n envoy-gateway-system deployment/envoy-gateway --for=condition=Available
365367
kubectl apply -f test/config/gatewayclass.yaml
366368
ifeq ($(CONFORMANCE_RUN_TEST),)
367-
go test $(EXPERIMENTAL_CONFORMANCE_TEST_ARGS) ./test/conformance -run TestExperimentalConformance --gateway-class=envoy-gateway --debug=true \
369+
go test $(EXPERIMENTAL_CONFORMANCE_TEST_ARGS) ./test/conformance -run TestExperimentalConformance $(E2E_TEST_SUITE_ARGS) --gateway-class=envoy-gateway \
368370
--organization=envoyproxy --project=envoy-gateway --url=https://github.com/envoyproxy/gateway --version=latest \
369371
--report-output="$(CONFORMANCE_REPORT_PATH)" --contact=https://github.com/envoyproxy/gateway/blob/main/GOVERNANCE.md \
370372
--mode="$(KUBE_DEPLOY_PROFILE)" --version=$(TAG)
371373
else
372374
# we didn't care about output when running single test
373-
go test $(EXPERIMENTAL_CONFORMANCE_TEST_ARGS) ./test/conformance -run TestExperimentalConformance --gateway-class=envoy-gateway --debug=true --run-test $(CONFORMANCE_RUN_TEST)
375+
go test $(EXPERIMENTAL_CONFORMANCE_TEST_ARGS) ./test/conformance -run TestExperimentalConformance $(E2E_TEST_SUITE_ARGS) --gateway-class=envoy-gateway --run-test $(CONFORMANCE_RUN_TEST)
374376
endif
375377

376378

0 commit comments

Comments
 (0)