Add e2e test case for DeleteVolume success on backend volume deletion

If a backend volume is deleted, DeleteVolume call for the same should
succeed, detecting the image is missing and delete the related OMaps.

This commit adds a test case to ensure this is occuring correctly.

Updates #474

Signed-off-by: ShyamsundarR <srangana@redhat.com>
This commit is contained in:
ShyamsundarR
2020-01-22 20:47:02 -05:00
committed by mergify[bot]
parent eb2fb9233b
commit b93ed21fe8
2 changed files with 61 additions and 1 deletions

View File

@ -165,6 +165,30 @@ var _ = Describe("cephfs", func() {
Fail(err.Error())
}
})
By("creating a PVC, deleting backing subvolume, and checking successful PV deletion", func() {
pvc, err := loadPVC(pvcPath)
if pvc == nil {
Fail(err.Error())
}
pvc.Namespace = f.UniqueName
err = createPVCAndvalidatePV(f.ClientSet, pvc, deployTimeout)
if err != nil {
Fail(err.Error())
}
err = deleteBackingCephFSVolume(f, pvc)
if err != nil {
Fail(err.Error())
}
err = deletePVCAndValidatePV(f.ClientSet, pvc, deployTimeout)
if err != nil {
Fail(err.Error())
}
})
By("Resize PVC and check application directory size", func() {
v, err := f.ClientSet.Discovery().ServerVersion()
if err != nil {