Skip to content

Commit

Permalink
test: using the same set of longhorn resources throughout the 2 stage…
Browse files Browse the repository at this point in the history
… upgrade test

Signed-off-by: Yang Chiu <yang.chiu@suse.com>
  • Loading branch information
yangchiu committed Aug 30, 2024
1 parent 5e42ab0 commit 7087f95
Show file tree
Hide file tree
Showing 19 changed files with 80 additions and 146 deletions.
9 changes: 9 additions & 0 deletions manager/integration/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
LONGHORN_REPO = "--longhorn-repo"
FLUX_HELM_CHART_URL = "--flux-helm-chart-url"
FLUX_HELM_CHART_VERSION = "--flux-helm-chart-version"
UPGRADE_LH_TRANSIENT_VERSION = "--upgrade-lh-transient-version"
UPGRADE_LH_REPO_URL = "--upgrade-lh-repo-url"
UPGRADE_LH_REPO_BRANCH = "--upgrade-lh-repo-branch"
UPGRADE_LH_MANAGER_IMAGE = "--upgrade-lh-manager-image"
Expand Down Expand Up @@ -103,6 +104,14 @@ def pytest_addoption(parser):
help='''if longhorn install method is flux, specify the
chart version when create flux helm release resource''')

parser.addoption(UPGRADE_LH_TRANSIENT_VERSION, action="store",
default="",
help='''set longhorn transient version, if provided,
longhorn will first install the stable version,
and then upgrade to this transient version,
and finally upgrade to the version to be tested.
(default:"")''')

longhorn_repo_url =\
"https://github.com/longhorn/longhorn.git"
parser.addoption(UPGRADE_LH_REPO_URL, action="store",
Expand Down
43 changes: 29 additions & 14 deletions manager/integration/tests/test_upgrade.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import os
import pytest
import subprocess
import time
Expand Down Expand Up @@ -100,6 +99,11 @@ def flux_helm_chart_version(request):
return request.config.getoption("--flux-helm-chart-version")


@pytest.fixture
def upgrade_longhorn_transient_version(request):
return request.config.getoption("--upgrade-lh-transient-version")


@pytest.fixture
def upgrade_longhorn_repo_url(request):
return request.config.getoption("--upgrade-lh-repo-url")
Expand Down Expand Up @@ -135,17 +139,6 @@ def upgrade_longhorn_backing_image_manager_image(request):
return request.config.getoption("--upgrade-lh-backing-image-manager-image")


def get_longhorn_upgrade_type():
return [os.environ.get('LONGHORN_UPGRADE_TYPE', '')]


@pytest.fixture(params=get_longhorn_upgrade_type())
def longhorn_upgrade_type():
# add parameter "from_stable" or "from_transient" to test_upgrade test case
# to distinguish them in the junit report.
pass


def longhorn_upgrade(longhorn_install_method,
rancher_hostname,
rancher_access_key,
Expand Down Expand Up @@ -223,15 +216,15 @@ def longhorn_upgrade(longhorn_install_method,


@pytest.mark.upgrade # NOQA
def test_upgrade(longhorn_upgrade_type,
longhorn_install_method,
def test_upgrade(longhorn_install_method,
rancher_hostname,
rancher_access_key,
rancher_secret_key,
rancher_chart_install_version,
longhorn_repo,
flux_helm_chart_url,
flux_helm_chart_version,
upgrade_longhorn_transient_version,
upgrade_longhorn_repo_url,
upgrade_longhorn_repo_branch,
upgrade_longhorn_manager_image,
Expand Down Expand Up @@ -277,6 +270,7 @@ def test_upgrade(longhorn_upgrade_type,
18. Verify the vol_rebuild is still healthy
"""
longhorn_install_method = longhorn_install_method
longhorn_transient_version = upgrade_longhorn_transient_version
longhorn_repo_url = upgrade_longhorn_repo_url
longhorn_repo_branch = upgrade_longhorn_repo_branch
longhorn_manager_image = upgrade_longhorn_manager_image
Expand Down Expand Up @@ -402,6 +396,27 @@ def test_upgrade(longhorn_upgrade_type,
write_pod_volume_data(core_api, rwx_statefulset_pod_name,
rwx_test_data, filename='test1')

if longhorn_transient_version and len(longhorn_transient_version) > 0:
# upgrade Longhorn manager to transient version
assert longhorn_upgrade(longhorn_install_method,
rancher_hostname,
rancher_access_key,
rancher_secret_key,
longhorn_transient_version,
longhorn_repo,
flux_helm_chart_url,
longhorn_transient_version,
longhorn_repo_url,
longhorn_transient_version,
"",
"",
"",
"",
"")

# wait for 1 minute before checking pod restarts
time.sleep(60)

# upgrade Longhorn manager
assert longhorn_upgrade(longhorn_install_method,
rancher_hostname,
Expand Down
11 changes: 3 additions & 8 deletions pipelines/argocd/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -128,14 +128,9 @@ node {
stage ('report generation') {
sh "docker cp ${JOB_BASE_NAME}-${BUILD_NUMBER}:${WORKSPACE}/longhorn-test-junit-report.xml ."

if(params.LONGHORN_UPGRADE_TEST && params.LONGHORN_TRANSIENT_VERSION) {
sh "docker cp ${JOB_BASE_NAME}-${BUILD_NUMBER}:${WORKSPACE}/longhorn-test-upgrade-from-stable-junit-report.xml ."
sh "docker cp ${JOB_BASE_NAME}-${BUILD_NUMBER}:${WORKSPACE}/longhorn-test-upgrade-from-transient-junit-report.xml ."
summary = junit 'longhorn-test-upgrade-from-stable-junit-report.xml, longhorn-test-upgrade-from-transient-junit-report.xml, longhorn-test-junit-report.xml'
}
else if(params.LONGHORN_UPGRADE_TEST) {
sh "docker cp ${JOB_BASE_NAME}-${BUILD_NUMBER}:${WORKSPACE}/longhorn-test-upgrade-from-stable-junit-report.xml ."
summary = junit 'longhorn-test-upgrade-from-stable-junit-report.xml, longhorn-test-junit-report.xml'
if(params.LONGHORN_UPGRADE_TEST) {
sh "docker cp ${JOB_BASE_NAME}-${BUILD_NUMBER}:${WORKSPACE}/longhorn-test-upgrade-junit-report.xml ."
summary = junit 'longhorn-test-upgrade-junit-report.xml, longhorn-test-junit-report.xml'
}
else {
summary = junit 'longhorn-test-junit-report.xml'
Expand Down
12 changes: 2 additions & 10 deletions pipelines/argocd/scripts/longhorn-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,8 @@ main(){
if [[ "${LONGHORN_UPGRADE_TEST}" == true ]]; then
create_argocd_app "${LONGHORN_STABLE_VERSION}"
sync_argocd_app
LONGHORN_UPGRADE_TYPE="from_stable"
LONGHORN_UPGRADE_TEST_POD_NAME="longhorn-test-upgrade-from-stable"
if [[ -n "${LONGHORN_TRANSIENT_VERSION}" ]]; then
UPGRADE_LH_REPO_URL="${LONGHORN_REPO_URI}"
UPGRADE_LH_REPO_BRANCH="${LONGHORN_TRANSIENT_VERSION}"
UPGRADE_LH_ENGINE_IMAGE="longhornio/longhorn-engine:${LONGHORN_TRANSIENT_VERSION}"
run_longhorn_upgrade_test
LONGHORN_UPGRADE_TYPE="from_transient"
LONGHORN_UPGRADE_TEST_POD_NAME="longhorn-test-upgrade-from-transient"
fi
LONGHORN_UPGRADE_TEST_POD_NAME="longhorn-test-upgrade"
UPGRADE_LH_TRANSIENT_VERSION="${LONGHORN_TRANSIENT_VERSION}"
UPGRADE_LH_REPO_URL="${LONGHORN_REPO_URI}"
UPGRADE_LH_REPO_BRANCH="${LONGHORN_INSTALL_VERSION}"
UPGRADE_LH_ENGINE_IMAGE="longhornio/longhorn-engine:${LONGHORN_INSTALL_VERSION}"
Expand Down
9 changes: 2 additions & 7 deletions pipelines/e2e/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -162,14 +162,9 @@ node {
sh "docker cp ${JOB_BASE_NAME}-${BUILD_NUMBER}:${WORKSPACE}/junit.html ."
sh "docker cp ${JOB_BASE_NAME}-${BUILD_NUMBER}:${WORKSPACE}/report.html ."

if(params.LONGHORN_UPGRADE_TEST && params.LONGHORN_TRANSIENT_VERSION) {
sh "docker cp ${JOB_BASE_NAME}-${BUILD_NUMBER}:${WORKSPACE}/longhorn-test-upgrade-from-stable-junit-report.xml ."
sh "docker cp ${JOB_BASE_NAME}-${BUILD_NUMBER}:${WORKSPACE}/longhorn-test-upgrade-from-transient-junit-report.xml ."
summary = junit 'longhorn-test-upgrade-from-stable-junit-report.xml, longhorn-test-upgrade-from-transient-junit-report.xml, longhorn-test-junit-report.xml'
}
else if(params.LONGHORN_UPGRADE_TEST) {
sh "docker cp ${JOB_BASE_NAME}-${BUILD_NUMBER}:${WORKSPACE}/longhorn-test-upgrade-from-stable-junit-report.xml ."
summary = junit 'longhorn-test-upgrade-from-stable-junit-report.xml, longhorn-test-junit-report.xml'
sh "docker cp ${JOB_BASE_NAME}-${BUILD_NUMBER}:${WORKSPACE}/longhorn-test-upgrade-junit-report.xml ."
summary = junit 'longhorn-test-upgrade-junit-report.xml, longhorn-test-junit-report.xml'
}
else {
summary = robot outputPath: '.'
Expand Down
11 changes: 3 additions & 8 deletions pipelines/fleet/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -93,14 +93,9 @@ node {
stage ('report generation') {
sh "docker cp ${JOB_BASE_NAME}-${BUILD_NUMBER}:${WORKSPACE}/longhorn-test-junit-report.xml ."

if(params.LONGHORN_UPGRADE_TEST && params.FLEET_REPO_TRANSIENT_VERSION) {
sh "docker cp ${JOB_BASE_NAME}-${BUILD_NUMBER}:${WORKSPACE}/longhorn-test-upgrade-from-stable-junit-report.xml ."
sh "docker cp ${JOB_BASE_NAME}-${BUILD_NUMBER}:${WORKSPACE}/longhorn-test-upgrade-from-transient-junit-report.xml ."
summary = junit 'longhorn-test-upgrade-from-stable-junit-report.xml, longhorn-test-upgrade-from-transient-junit-report.xml, longhorn-test-junit-report.xml'
}
else if(params.LONGHORN_UPGRADE_TEST) {
sh "docker cp ${JOB_BASE_NAME}-${BUILD_NUMBER}:${WORKSPACE}/longhorn-test-upgrade-from-stable-junit-report.xml ."
summary = junit 'longhorn-test-upgrade-from-stable-junit-report.xml, longhorn-test-junit-report.xml'
if(params.LONGHORN_UPGRADE_TEST) {
sh "docker cp ${JOB_BASE_NAME}-${BUILD_NUMBER}:${WORKSPACE}/longhorn-test-upgrade-junit-report.xml ."
summary = junit 'longhorn-test-upgrade-junit-report.xml, longhorn-test-junit-report.xml'
}
else {
summary = junit 'longhorn-test-junit-report.xml'
Expand Down
12 changes: 2 additions & 10 deletions pipelines/fleet/scripts/longhorn-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,8 @@ main(){

if [[ "${LONGHORN_UPGRADE_TEST}" == true ]]; then
create_fleet_git_repo "${FLEET_REPO_STABLE_VERSION}"
LONGHORN_UPGRADE_TYPE="from_stable"
LONGHORN_UPGRADE_TEST_POD_NAME="longhorn-test-upgrade-from-stable"
if [[ -n "${FLEET_REPO_TRANSIENT_VERSION}" ]]; then
UPGRADE_LH_REPO_URL="${FLEET_REPO_URI}"
UPGRADE_LH_REPO_BRANCH="${FLEET_REPO_TRANSIENT_VERSION}"
UPGRADE_LH_ENGINE_IMAGE="longhornio/longhorn-engine:${FLEET_REPO_TRANSIENT_VERSION}"
run_longhorn_upgrade_test
LONGHORN_UPGRADE_TYPE="from_transient"
LONGHORN_UPGRADE_TEST_POD_NAME="longhorn-test-upgrade-from-transient"
fi
LONGHORN_UPGRADE_TEST_POD_NAME="longhorn-test-upgrade"
UPGRADE_LH_TRANSIENT_VERSION="${FLEET_REPO_TRANSIENT_VERSION}"
UPGRADE_LH_REPO_URL="${FLEET_REPO_URI}"
UPGRADE_LH_REPO_BRANCH="${FLEET_REPO_VERSION}"
UPGRADE_LH_ENGINE_IMAGE="longhornio/longhorn-engine:${FLEET_REPO_VERSION}"
Expand Down
11 changes: 3 additions & 8 deletions pipelines/flux/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -128,14 +128,9 @@ node {
stage ('report generation') {
sh "docker cp ${JOB_BASE_NAME}-${BUILD_NUMBER}:${WORKSPACE}/longhorn-test-junit-report.xml ."

if(params.LONGHORN_UPGRADE_TEST && params.LONGHORN_TRANSIENT_VERSION) {
sh "docker cp ${JOB_BASE_NAME}-${BUILD_NUMBER}:${WORKSPACE}/longhorn-test-upgrade-from-stable-junit-report.xml ."
sh "docker cp ${JOB_BASE_NAME}-${BUILD_NUMBER}:${WORKSPACE}/longhorn-test-upgrade-from-transient-junit-report.xml ."
summary = junit 'longhorn-test-upgrade-from-stable-junit-report.xml, longhorn-test-upgrade-from-transient-junit-report.xml, longhorn-test-junit-report.xml'
}
else if(params.LONGHORN_UPGRADE_TEST) {
sh "docker cp ${JOB_BASE_NAME}-${BUILD_NUMBER}:${WORKSPACE}/longhorn-test-upgrade-from-stable-junit-report.xml ."
summary = junit 'longhorn-test-upgrade-from-stable-junit-report.xml, longhorn-test-junit-report.xml'
if(params.LONGHORN_UPGRADE_TEST) {
sh "docker cp ${JOB_BASE_NAME}-${BUILD_NUMBER}:${WORKSPACE}/longhorn-test-upgrade-junit-report.xml ."
summary = junit 'longhorn-test-upgrade-junit-report.xml, longhorn-test-junit-report.xml'
}
else {
summary = junit 'longhorn-test-junit-report.xml'
Expand Down
12 changes: 2 additions & 10 deletions pipelines/flux/scripts/longhorn-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,8 @@ main(){
if [[ "${LONGHORN_UPGRADE_TEST}" == true ]]; then
create_flux_helm_repo "${HELM_CHART_DEFAULT_URL}"
create_flux_helm_release "${LONGHORN_STABLE_VERSION}"
LONGHORN_UPGRADE_TYPE="from_stable"
LONGHORN_UPGRADE_TEST_POD_NAME="longhorn-test-upgrade-from-stable"
if [[ -n "${LONGHORN_TRANSIENT_VERSION}" ]]; then
FLUX_HELM_CHART_URL="${HELM_CHART_DEFAULT_URL}"
FLUX_HELM_CHART_VERSION="${LONGHORN_TRANSIENT_VERSION}"
UPGRADE_LH_ENGINE_IMAGE="longhornio/longhorn-engine:${LONGHORN_TRANSIENT_VERSION}"
run_longhorn_upgrade_test
LONGHORN_UPGRADE_TYPE="from_transient"
LONGHORN_UPGRADE_TEST_POD_NAME="longhorn-test-upgrade-from-transient"
fi
LONGHORN_UPGRADE_TEST_POD_NAME="longhorn-test-upgrade"
UPGRADE_LH_TRANSIENT_VERSION="${LONGHORN_TRANSIENT_VERSION}"
FLUX_HELM_CHART_URL="${HELM_CHART_URL}"
FLUX_HELM_CHART_VERSION="${LONGHORN_INSTALL_VERSION}"
UPGRADE_LH_ENGINE_IMAGE="longhornio/longhorn-engine:${LONGHORN_INSTALL_VERSION}"
Expand Down
4 changes: 2 additions & 2 deletions pipelines/gke/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ node {
sh "docker cp ${JOB_BASE_NAME}-${BUILD_NUMBER}:${TF_VAR_tf_workspace}/longhorn-test-junit-report.xml ."

if(params.LONGHORN_UPGRADE_TEST) {
sh "docker cp ${JOB_BASE_NAME}-${BUILD_NUMBER}:${TF_VAR_tf_workspace}/longhorn-test-upgrade-from-stable-junit-report.xml ."
summary = junit 'longhorn-test-upgrade-from-stable-junit-report.xml, longhorn-test-junit-report.xml'
sh "docker cp ${JOB_BASE_NAME}-${BUILD_NUMBER}:${TF_VAR_tf_workspace}/longhorn-test-upgrade-junit-report.xml ."
summary = junit 'longhorn-test-upgrade-junit-report.xml, longhorn-test-junit-report.xml'
}
else {
summary = junit 'longhorn-test-junit-report.xml'
Expand Down
4 changes: 2 additions & 2 deletions pipelines/gke/scripts/longhorn-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -300,8 +300,8 @@ main(){
if [[ "${LONGHORN_UPGRADE_TEST}" == true ]]; then
generate_longhorn_yaml_manifest "${TF_VAR_tf_workspace}"
install_longhorn_stable
LONGHORN_UPGRADE_TYPE="from_stable"
LONGHORN_UPGRADE_TEST_POD_NAME="longhorn-test-upgrade-from-stable"
LONGHORN_UPGRADE_TEST_POD_NAME="longhorn-test-upgrade"
UPGRADE_LH_TRANSIENT_VERSION="${LONGHORN_TRANSIENT_VERSION}"
UPGRADE_LH_REPO_URL="${LONGHORN_REPO_URI}"
UPGRADE_LH_REPO_BRANCH="${LONGHORN_REPO_BRANCH}"
UPGRADE_LH_MANAGER_IMAGE="${CUSTOM_LONGHORN_MANAGER_IMAGE}"
Expand Down
11 changes: 3 additions & 8 deletions pipelines/helm/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -136,14 +136,9 @@ node {
stage ('report generation') {
sh "docker cp ${JOB_BASE_NAME}-${BUILD_NUMBER}:${WORKSPACE}/longhorn-test-junit-report.xml ."

if(params.LONGHORN_UPGRADE_TEST && params.LONGHORN_TRANSIENT_VERSION) {
sh "docker cp ${JOB_BASE_NAME}-${BUILD_NUMBER}:${WORKSPACE}/longhorn-test-upgrade-from-stable-junit-report.xml ."
sh "docker cp ${JOB_BASE_NAME}-${BUILD_NUMBER}:${WORKSPACE}/longhorn-test-upgrade-from-transient-junit-report.xml ."
summary = junit 'longhorn-test-upgrade-from-stable-junit-report.xml, longhorn-test-upgrade-from-transient-junit-report.xml, longhorn-test-junit-report.xml'
}
else if(params.LONGHORN_UPGRADE_TEST) {
sh "docker cp ${JOB_BASE_NAME}-${BUILD_NUMBER}:${WORKSPACE}/longhorn-test-upgrade-from-stable-junit-report.xml ."
summary = junit 'longhorn-test-upgrade-from-stable-junit-report.xml, longhorn-test-junit-report.xml'
if(params.LONGHORN_UPGRADE_TEST) {
sh "docker cp ${JOB_BASE_NAME}-${BUILD_NUMBER}:${WORKSPACE}/longhorn-test-upgrade-junit-report.xml ."
summary = junit 'longhorn-test-upgrade-junit-report.xml, longhorn-test-junit-report.xml'
}
else {
summary = junit 'longhorn-test-junit-report.xml'
Expand Down
12 changes: 2 additions & 10 deletions pipelines/helm/scripts/longhorn-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,16 +50,8 @@ main(){
if [[ "${LONGHORN_UPGRADE_TEST}" == true ]]; then
get_longhorn_chart "${LONGHORN_STABLE_VERSION}"
install_longhorn
LONGHORN_UPGRADE_TYPE="from_stable"
LONGHORN_UPGRADE_TEST_POD_NAME="longhorn-test-upgrade-from-stable"
if [[ -n "${LONGHORN_TRANSIENT_VERSION}" ]]; then
UPGRADE_LH_REPO_URL="${LONGHORN_REPO_URI}"
UPGRADE_LH_REPO_BRANCH="${LONGHORN_TRANSIENT_VERSION}"
UPGRADE_LH_ENGINE_IMAGE="longhornio/longhorn-engine:${LONGHORN_TRANSIENT_VERSION}"
run_longhorn_upgrade_test
LONGHORN_UPGRADE_TYPE="from_transient"
LONGHORN_UPGRADE_TEST_POD_NAME="longhorn-test-upgrade-from-transient"
fi
LONGHORN_UPGRADE_TEST_POD_NAME="longhorn-test-upgrade"
UPGRADE_LH_TRANSIENT_VERSION="${LONGHORN_TRANSIENT_VERSION}"
UPGRADE_LH_REPO_URL="${LONGHORN_REPO_URI}"
UPGRADE_LH_REPO_BRANCH="${LONGHORN_REPO_BRANCH}"
UPGRADE_LH_MANAGER_IMAGE="${CUSTOM_LONGHORN_MANAGER_IMAGE}"
Expand Down
11 changes: 3 additions & 8 deletions pipelines/rancher/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -137,14 +137,9 @@ node {
stage ('report generation') {
sh "docker cp ${JOB_BASE_NAME}-${BUILD_NUMBER}:${WORKSPACE}/longhorn-test-junit-report.xml ."

if(params.LONGHORN_UPGRADE_TEST && params.LONGHORN_TRANSIENT_VERSION) {
sh "docker cp ${JOB_BASE_NAME}-${BUILD_NUMBER}:${WORKSPACE}/longhorn-test-upgrade-from-stable-junit-report.xml ."
sh "docker cp ${JOB_BASE_NAME}-${BUILD_NUMBER}:${WORKSPACE}/longhorn-test-upgrade-from-transient-junit-report.xml ."
summary = junit 'longhorn-test-upgrade-from-stable-junit-report.xml, longhorn-test-upgrade-from-transient-junit-report.xml, longhorn-test-junit-report.xml'
}
else if(params.LONGHORN_UPGRADE_TEST) {
sh "docker cp ${JOB_BASE_NAME}-${BUILD_NUMBER}:${WORKSPACE}/longhorn-test-upgrade-from-stable-junit-report.xml ."
summary = junit 'longhorn-test-upgrade-from-stable-junit-report.xml, longhorn-test-junit-report.xml'
if(params.LONGHORN_UPGRADE_TEST) {
sh "docker cp ${JOB_BASE_NAME}-${BUILD_NUMBER}:${WORKSPACE}/longhorn-test-upgrade-junit-report.xml ."
summary = junit 'longhorn-test-upgrade-junit-report.xml, longhorn-test-junit-report.xml'
}
else {
summary = junit 'longhorn-test-junit-report.xml'
Expand Down
18 changes: 3 additions & 15 deletions pipelines/rancher/scripts/longhorn-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,22 +42,10 @@ main(){

if [[ "${LONGHORN_UPGRADE_TEST}" == true ]]; then
install_longhorn_rancher_chart "${LONGHORN_STABLE_VERSION}"
LONGHORN_UPGRADE_TYPE="from_stable"
LONGHORN_UPGRADE_TEST_POD_NAME="longhorn-test-upgrade-from-stable"
if [[ -n "${LONGHORN_TRANSIENT_VERSION}" ]]; then
RANCHER_CHART_INSTALL_VERSION="${LONGHORN_TRANSIENT_VERSION}"
# extract 1.4.2 from 102.2.1+up1.4.2
RAW_VERSION=(${LONGHORN_TRANSIENT_VERSION/up/ })
if [[ "${LONGHORN_REPO}" == "rancher" ]]; then
UPGRADE_LH_ENGINE_IMAGE="rancher/mirrored-longhornio-longhorn-engine:v${RAW_VERSION[1]}"
else
UPGRADE_LH_ENGINE_IMAGE="longhornio/longhorn-engine:v${RAW_VERSION[1]}"
fi
run_longhorn_upgrade_test
LONGHORN_UPGRADE_TYPE="from_transient"
LONGHORN_UPGRADE_TEST_POD_NAME="longhorn-test-upgrade-from-transient"
fi
LONGHORN_UPGRADE_TEST_POD_NAME="longhorn-test-upgrade"
UPGRADE_LH_TRANSIENT_VERSION="${LONGHORN_TRANSIENT_VERSION}"
RANCHER_CHART_INSTALL_VERSION="${LONGHORN_INSTALL_VERSION}"
# extract 1.4.2 from 102.2.1+up1.4.2
RAW_VERSION=(${LONGHORN_INSTALL_VERSION/up/ })
if [[ "${LONGHORN_REPO}" == "rancher" ]]; then
UPGRADE_LH_ENGINE_IMAGE="rancher/mirrored-longhornio-longhorn-engine:v${RAW_VERSION[1]}"
Expand Down
Loading

0 comments on commit 7087f95

Please sign in to comment.