Skip to content

Commit

Permalink
allow running gateway api conformance tests on PRs (#733)
Browse files Browse the repository at this point in the history
  • Loading branch information
dprotaso authored May 23, 2024
1 parent 80dea62 commit e89c613
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
4 changes: 4 additions & 0 deletions test/e2e-common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ export GATEWAY_NAMESPACE_OVERRIDE=${GATEWAY_NAMESPACE_OVERRIDE:-istio-system}
export GATEWAY_CLASS=${GATEWAY_CLASS:-istio}
export UNSUPPORTED_E2E_TESTS=${UNSUPPORTED_E2E_TESTS:-$ISTIO_UNSUPPORTED_E2E_TESTS}
export KIND=${KIND:-0}
export GATEWAY_TESTS_ONLY=${GATEWAY_TESTS_ONLY:-0}

function parse_flags() {
case "$1" in
Expand All @@ -49,6 +50,9 @@ function parse_flags() {
readonly KIND=1
return 1
;;
--gateway-tests-only)
readonly GATEWAY_TESTS_ONLY=1
return 1
esac
return 0
}
Expand Down
10 changes: 6 additions & 4 deletions test/e2e-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,13 @@ header "Running e2e tests"

failed=0

knative_conformance || failed=1
test_ha || failed=1
test_e2e || failed=1
if [[ "$GATEWAY_TESTS_ONLY" -eq "0" ]]; then
knative_conformance || failed=1
test_ha || failed=1
test_e2e || failed=1
fi

if [[ "${JOB_NAME:-unknown}" == *"continuous"* ]]; then
if [[ "${JOB_NAME:-unknown}" == *"continuous"* ]] || (( GATEWAY_TESTS_ONLY )); then
gateway_conformance || true # this is informational
fi

Expand Down

0 comments on commit e89c613

Please sign in to comment.