From 81809500be8dde7760978b3daa2e15bc2740eec1 Mon Sep 17 00:00:00 2001 From: Rakshith R Date: Mon, 17 May 2021 15:28:15 +0530 Subject: [PATCH] e2e: wait for upgraded pods to be running during upgrade-tests This commit calls `waitForDaemonSets` and `waitForDeploymentComplete` after upgrading to wait for csi driver pods to be in running state for both rbd and cephfs upgrade tests. Signed-off-by: Rakshith R --- e2e/upgrade-cephfs.go | 10 ++++++++++ e2e/upgrade-rbd.go | 11 +++++++++++ 2 files changed, 21 insertions(+) diff --git a/e2e/upgrade-cephfs.go b/e2e/upgrade-cephfs.go index c7392e211..710b2f126 100644 --- a/e2e/upgrade-cephfs.go +++ b/e2e/upgrade-cephfs.go @@ -234,6 +234,16 @@ var _ = Describe("CephFS Upgrade Testing", func() { } deployCephfsPlugin() + err = waitForDeploymentComplete(cephfsDeploymentName, cephCSINamespace, f.ClientSet, deployTimeout) + if err != nil { + e2elog.Failf("timeout waiting for upgraded deployment %s with error %v", cephfsDeploymentName, err) + } + + err = waitForDaemonSets(cephfsDeamonSetName, cephCSINamespace, f.ClientSet, deployTimeout) + if err != nil { + e2elog.Failf("timeout waiting for upgraded daemonset %s with error %v", cephfsDeamonSetName, err) + } + app.Labels = label // validate if the app gets bound to a pvc created by // an earlier release. diff --git a/e2e/upgrade-rbd.go b/e2e/upgrade-rbd.go index cbb1297a8..a73a58d9a 100644 --- a/e2e/upgrade-rbd.go +++ b/e2e/upgrade-rbd.go @@ -251,6 +251,17 @@ var _ = Describe("RBD Upgrade Testing", func() { } deployRBDPlugin() + + err = waitForDeploymentComplete(rbdDeploymentName, cephCSINamespace, f.ClientSet, deployTimeout) + if err != nil { + e2elog.Failf("timeout waiting for upgraded deployment %s with error %v", rbdDeploymentName, err) + } + + err = waitForDaemonSets(rbdDaemonsetName, cephCSINamespace, f.ClientSet, deployTimeout) + if err != nil { + e2elog.Failf("timeout waiting for upgraded daemonset %s with error %v", rbdDaemonsetName, err) + } + // validate if the app gets bound to a pvc created by // an earlier release. app.Labels = label