From 90d20062d9071238509b698b3d64fa4e59320700 Mon Sep 17 00:00:00 2001 From: Mugdha Adhav Date: Tue, 23 Jan 2024 13:55:53 +0530 Subject: [PATCH] fix: backwards-compatibility test --- test/integration/backward-compatability.sh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/test/integration/backward-compatability.sh b/test/integration/backward-compatability.sh index 2a48c76..1419030 100755 --- a/test/integration/backward-compatability.sh +++ b/test/integration/backward-compatability.sh @@ -11,16 +11,19 @@ kubectlwait default compatible-ephemeral-volume kubectl apply -f "${TestBase}/compatible-manifests/pre-provisioned-pv.yaml" kubectlwait default compatible-pre-provisioned-pv -kubectl delete --ignore-not-found -f 'https://raw.githubusercontent.com/warm-metal/container-image-csi-driver/v0.4.2/install/cri-containerd.yaml' +#Ignore deletion of older CSI driver for now to test if dual installation of the driver works. export VALUE_FILE=$(dirname "${BASH_SOURCE[0]}")/../../charts/warm-metal-csi-driver/values.yaml export IMAGE_TAG=$(git rev-parse --short HEAD) export HELM_NAME="wm-csi-integration-tests" +export NAMESPACE="container-image-compatibility-test-ns" trap "kubectl -n kube-system describe po" ERR -echo "Install the new verson of the driver using image ${IMAGE_TAG}" -helm install ${HELM_NAME} charts/warm-metal-csi-driver -n kube-system \ +echo "Install the new version of the driver using image ${IMAGE_TAG}" +kubectl create namespace "${NAMESPACE}" +kubectl wait --for=jsonpath='{.status.phase}'=Active namespace/"${NAMESPACE}" +helm install ${HELM_NAME} charts/warm-metal-csi-driver -n "${NAMESPACE}" \ -f ${VALUE_FILE} \ --set csiPlugin.image.tag=${IMAGE_TAG} \ --set pullImageSecretForDaemonset=warmmetal \ @@ -34,5 +37,6 @@ lib::run_test_job "${TestBase}/manifests/pre-provisioned-pv.yaml" kubectl delete -f "${TestBase}/compatible-manifests/ephemeral-volume.yaml" kubectl delete --ignore-not-found -f "${TestBase}/compatible-manifests/pre-provisioned-pv.yaml" -helm uninstall -n kube-system ${HELM_NAME} --wait +helm uninstall -n "${NAMESPACE}" ${HELM_NAME} --wait +kubectl delete --ignore-not-found -f 'https://raw.githubusercontent.com/warm-metal/container-image-csi-driver/v0.4.2/install/cri-containerd.yaml' set +e