mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-23 14:50:24 +00:00
Added E2E for rbd nodeplugin restart
Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
(cherry picked from commit 3f8a073258
)
This commit is contained in:
parent
74852cf230
commit
ecac134c38
34
e2e/rbd.go
34
e2e/rbd.go
@ -234,6 +234,40 @@ var _ = Describe("RBD", func() {
|
|||||||
Fail(err.Error())
|
Fail(err.Error())
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
By("Test unmount after nodeplugin restart", func() {
|
||||||
|
pvc, err := loadPVC(pvcPath)
|
||||||
|
if err != nil {
|
||||||
|
Fail(err.Error())
|
||||||
|
}
|
||||||
|
pvc.Namespace = f.UniqueName
|
||||||
|
|
||||||
|
app, err := loadApp(appPath)
|
||||||
|
if err != nil {
|
||||||
|
Fail(err.Error())
|
||||||
|
}
|
||||||
|
app.Namespace = f.UniqueName
|
||||||
|
err = createPVCAndApp("", f, pvc, app)
|
||||||
|
if err != nil {
|
||||||
|
Fail(err.Error())
|
||||||
|
}
|
||||||
|
|
||||||
|
// delete rbd nodeplugin pods
|
||||||
|
err = deletePodWithLabel("app=csi-rbdplugin")
|
||||||
|
if err != nil {
|
||||||
|
Fail(err.Error())
|
||||||
|
}
|
||||||
|
// wait for nodeplugin pods to come up
|
||||||
|
err = waitForDaemonSets(rbdDaemonsetName, namespace, f.ClientSet, deployTimeout)
|
||||||
|
if err != nil {
|
||||||
|
Fail(err.Error())
|
||||||
|
}
|
||||||
|
|
||||||
|
err = deletePVCAndApp("", f, pvc, app)
|
||||||
|
if err != nil {
|
||||||
|
Fail(err.Error())
|
||||||
|
}
|
||||||
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -611,6 +611,13 @@ func validatePVCAndAppBinding(pvcPath, appPath string, f *framework.Framework) {
|
|||||||
Fail(err.Error())
|
Fail(err.Error())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
func deletePodWithLabel(label string) error {
|
||||||
|
_, err := framework.RunKubectl("delete", "po", "-l", label)
|
||||||
|
if err != nil {
|
||||||
|
e2elog.Logf("failed to delete pod %v", err)
|
||||||
|
}
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
func validateNormalUserPVCAccess(pvcPath string, f *framework.Framework) {
|
func validateNormalUserPVCAccess(pvcPath string, f *framework.Framework) {
|
||||||
pvc, err := loadPVC(pvcPath)
|
pvc, err := loadPVC(pvcPath)
|
||||||
|
Loading…
Reference in New Issue
Block a user