Skip to content

Commit 1c69c37

Browse files
authored
Fix inference conformance duplication (#4492)
Problem: The inference conformance tests were running twice, due to all tests existing in the same test file. Solution: Only run specific conformance tests.
1 parent 937a24c commit 1c69c37

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

tests/Makefile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,12 @@ run-conformance-tests: ## Run conformance tests
5656
kubectl run -i conformance \
5757
--image=$(CONFORMANCE_PREFIX):$(CONFORMANCE_TAG) --image-pull-policy=Never \
5858
--overrides='{ "spec": { "serviceAccountName": "conformance" } }' \
59-
--restart=Never -- sh -c "go test -v . -tags conformance,experimental -args --gateway-class=$(GATEWAY_CLASS) \
59+
--restart=Never -- sh -c "go test -v -run TestConformance . -tags conformance,experimental -args --gateway-class=$(GATEWAY_CLASS) \
6060
--version=$(NGF_VERSION) --skip-tests=$(SKIP_TESTS) --conformance-profiles=$(CONFORMANCE_PROFILES) \
6161
--report-output=output.txt; cat output.txt" | tee output.txt
6262
./scripts/check-pod-exit-code.sh conformance
6363
sed -e '1,/CONFORMANCE PROFILE/d' output.txt > conformance-profile.yaml
64+
rm output.txt
6465
grpc_core_result=`yq '.profiles[0].core.result' conformance-profile.yaml`; \
6566
http_core_result=`yq '.profiles[1].core.result' conformance-profile.yaml`; \
6667
http_extended_result=`yq '.profiles[1].extended.result' conformance-profile.yaml`; \
@@ -76,7 +77,7 @@ run-conformance-tests-openshift: ## Run conformance tests on OpenShift (skips te
7677
kubectl run -i conformance \
7778
--image=$(CONFORMANCE_PREFIX):$(CONFORMANCE_TAG) --image-pull-policy=Always \
7879
--overrides='{ "spec": { "serviceAccountName": "conformance" } }' \
79-
--restart=Never -- sh -c "go test -v . -tags conformance,experimental -args --gateway-class=$(GATEWAY_CLASS) \
80+
--restart=Never -- sh -c "go test -v -run TestConformance . -tags conformance,experimental -args --gateway-class=$(GATEWAY_CLASS) \
8081
--supported-features=$(SUPPORTED_EXTENDED_FEATURES_OPENSHIFT) --version=$(NGF_VERSION) --skip-tests=$(SKIP_TESTS_OPENSHIFT) --conformance-profiles=$(CONFORMANCE_PROFILES) \
8182
--service-type=$(GW_SERVICE_TYPE) --report-output=output.txt; cat output.txt" | tee output.txt
8283
./scripts/check-pod-exit-code.sh conformance
@@ -98,7 +99,7 @@ run-inference-conformance-tests: ## Run inference conformance tests
9899
kubectl run -i conformance-inference \
99100
--image=$(CONFORMANCE_PREFIX):$(CONFORMANCE_TAG) --image-pull-policy=Never \
100101
--overrides='{ "spec": { "serviceAccountName": "conformance" } }' \
101-
--restart=Never -- sh -c "go test -v . -tags conformance -args --gateway-class=$(GATEWAY_CLASS) \
102+
--restart=Never -- sh -c "go test -v -run TestInferenceExtensionConformance . -tags conformance -args --gateway-class=$(GATEWAY_CLASS) \
102103
--version=$(NGF_VERSION) \
103104
--skip-tests=$(INFERENCE_SKIP_TESTS) \
104105
--supported-features=$(INFERENCE_SUPPORTED_FEATURES) \

0 commit comments

Comments
 (0)