Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 11 additions & 6 deletions test/e2e-common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -101,15 +101,20 @@ function istio_yaml() {

# Download the repository of Knative. The purpose of this function is to download the source code of
# knative component for further use, based on component name and branch name.
# Parameter: $1 - component name, either serving or eventing, $2 - branch of the repository.
function donwload_knative() {
local component=$1
# Parameters:
# $1 - component repo name, either knative/serving or knative/eventing,
# $2 - component name,
# $3 - branch of the repository.
function download_knative() {
local component_repo component_name
component_repo=$1
component_name=$2
# Go the directory to download the source code of knative
cd ${KNATIVE_DIR}
# Download the source code of knative
git clone https://github.com/knative/${component}.git
cd ${component}
local branch=$2
git clone "https://github.com/${component_repo}.git" "${component_name}"
cd "${component_name}"
local branch=$3
if [ -n "${branch}" ] ; then
git fetch origin ${branch}:${branch}
git checkout ${branch}
Expand Down
5 changes: 3 additions & 2 deletions test/e2e-upgrade-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ readonly EVENTING_PROBER_FILE="/tmp/prober-signal-eventing"

# TODO: remove when components can coexist in same namespace
export TEST_EVENTING_NAMESPACE=knative-eventing
export E2E_UPGRADE_TESTS_SERVING_USE=true

function install_previous_operator_release() {
install_istio || fail_test "Istio installation failed"
Expand Down Expand Up @@ -105,8 +106,8 @@ EOF
function knative_setup() {
create_namespace
install_previous_operator_release
donwload_knative "serving" ${KNATIVE_REPO_BRANCH}
donwload_knative "eventing" ${KNATIVE_REPO_BRANCH}
download_knative "${KNATIVE_SERVING_REPO:-knative/serving}" serving "${KNATIVE_REPO_BRANCH}"
download_knative "${KNATIVE_EVENTING_REPO:-knative/eventing}" eventing "${KNATIVE_REPO_BRANCH}"
}

# Create test resources and images
Expand Down