Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use preinstall 0.18 in upgrade tests #3927

Merged
merged 3 commits into from
Aug 27, 2020
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
6 changes: 3 additions & 3 deletions config/pre-install/v0.18.0/storage-version-migration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ spec:
# and substituted here.
image: ko://knative.dev/eventing/vendor/knative.dev/pkg/apiextensions/storageversion/cmd/migrate
args:
- "containersources.eventing.knative.dev"
- "containersources.sources.knative.dev"
- "sinkbindings.sources.knative.dev"
- "brokers.sources.knative.dev"
- "triggers.sources.knative.dev"
- "brokers.eventing.knative.dev"
- "triggers.eventing.knative.dev"
Comment on lines -41 to +44
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are problems I found when trying to make the migration test working.

- "channels.messaging.knative.dev"
- "inmemorychannels.messaging.knative.dev"
16 changes: 8 additions & 8 deletions test/e2e-common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ readonly SUGAR_CONTROLLER_CONFIG="config/sugar/500-controller.yaml"
# Config tracing config.
readonly CONFIG_TRACING_CONFIG="test/config/config-tracing.yaml"

# PreInstall script for v0.16
readonly PRE_INSTALL_V016="config/pre-install/v0.16.0"
# PreInstall script for v0.18
readonly PRE_INSTALL_V018="config/pre-install/v0.18.0"

# The number of controlplane replicas to run.
readonly REPLICAS=3
Expand Down Expand Up @@ -176,12 +176,12 @@ function install_latest_release() {
fail_test "Knative latest release installation failed"
}

function run_preinstall_V016() {
local TMP_PRE_INSTALL_V016=${TMP_DIR}/pre_install
mkdir -p ${TMP_PRE_INSTALL_V016}
cp -r ${PRE_INSTALL_V016}/* ${TMP_PRE_INSTALL_V016}
find ${TMP_PRE_INSTALL_V016} -type f -name "*.yaml" -exec sed -i "s/namespace: ${KNATIVE_DEFAULT_NAMESPACE}/namespace: ${TEST_EVENTING_NAMESPACE}/g" {} +
ko apply --strict -f "${TMP_PRE_INSTALL_V016}" || return 1
function run_preinstall_V018() {
local TMP_PRE_INSTALL_V018=${TMP_DIR}/pre_install
mkdir -p ${TMP_PRE_INSTALL_V018}
cp -r ${PRE_INSTALL_V018}/* ${TMP_PRE_INSTALL_V018}
find ${TMP_PRE_INSTALL_V018} -type f -name "*.yaml" -exec sed -i "s/namespace: ${KNATIVE_DEFAULT_NAMESPACE}/namespace: ${TEST_EVENTING_NAMESPACE}/g" {} +
ko apply --strict -f "${TMP_PRE_INSTALL_V018}" || return 1
wait_until_batch_job_complete ${TEST_EVENTING_NAMESPACE} || return 1
}

Expand Down
2 changes: 1 addition & 1 deletion test/e2e-upgrade-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ echo "Prober PID is ${PROBER_PID}"
wait_for_file ${PROBER_READY_FILE} || fail_test

header "Performing upgrade to HEAD"
run_preinstall_V016 || fail_test 'Running preinstall 0.16 failed'
run_preinstall_V018 || fail_test 'Running preinstall 0.18 failed'
install_head || fail_test 'Installing HEAD version of eventing failed'
install_channel_crds || fail_test 'Installing HEAD channel CRDs failed'
install_mt_broker || fail_test 'Installing HEAD Broker failed'
Expand Down