Skip to content

Commit

Permalink
fix: backwards-compatibility test
Browse files Browse the repository at this point in the history
  • Loading branch information
mugdha-adhav committed Jan 23, 2024
1 parent 62817c0 commit 90d2006
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions test/integration/backward-compatability.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand All @@ -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

0 comments on commit 90d2006

Please sign in to comment.