Skip to content

Commit

Permalink
Make e2e test run over other networks
Browse files Browse the repository at this point in the history
  • Loading branch information
BbolroC committed Jun 7, 2021
1 parent 81cb343 commit bd15a46
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
10 changes: 9 additions & 1 deletion test/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@

source $(dirname $0)/../vendor/knative.dev/hack/e2e-tests.sh

export INGRESS_CLASS=${INGRESS_CLASS:-istio.ingress.networking.knative.dev}

function is_ingress_class() {
[[ "${INGRESS_CLASS}" == *"${1}"* ]]
}

function cluster_setup() {
header "Building client"
${REPO_ROOT_DIR}/hack/build.sh -f || return 1
Expand Down Expand Up @@ -59,7 +65,9 @@ function install_istio() {
}

function knative_setup() {
install_istio
if is_ingress_class istio; then
install_istio
fi

local serving_version=${KNATIVE_SERVING_VERSION:-latest}
header "Installing Knative Serving (${serving_version})"
Expand Down
4 changes: 3 additions & 1 deletion vendor/knative.dev/hack/library.sh
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,9 @@ function start_knative_serving() {
echo "Installing Serving CRDs from $1"
kubectl apply -f "$1"
echo "Installing Serving core components from $2"
kubectl apply -f "$2"
curl -sL "$2" | \
awk '/config-network/{f=1} f==1 && /data/ {print;f++;print " ingress.class: '${INGRESS_CLASS}'";next}1' | \
kubectl apply -f -
echo "Installing net-istio components from $3"
kubectl apply -f "$3"
wait_until_pods_running knative-serving || return 1
Expand Down

0 comments on commit bd15a46

Please sign in to comment.