e2e: Introduce e2e test for block mode PVC

Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
This commit is contained in:
Humble Chirammal 2020-10-15 19:24:57 +05:30 committed by mergify[bot]
parent 5763e996af
commit 25400a7334

View File

@ -239,8 +239,10 @@ var _ = Describe("RBD", func() {
rawAppPath := rbdExamplePath + "raw-block-pod.yaml"
pvcClonePath := rbdExamplePath + "pvc-restore.yaml"
pvcSmartClonePath := rbdExamplePath + "pvc-clone.yaml"
pvcBlockSmartClonePath := rbdExamplePath + "pvc-block-clone.yaml"
appClonePath := rbdExamplePath + "pod-restore.yaml"
appSmartClonePath := rbdExamplePath + "pod-clone.yaml"
appBlockSmartClonePath := rbdExamplePath + "block-pod-clone.yaml"
snapshotPath := rbdExamplePath + "snapshot.yaml"
By("checking provisioner deployment is running", func() {
@ -590,7 +592,16 @@ var _ = Describe("RBD", func() {
e2elog.Failf("failed to validate pvc and application binding with error %v", err)
}
})
By("create a Block mode PVC-PVC clone and bind it to an app", func() {
v, err := f.ClientSet.Discovery().ServerVersion()
if err != nil {
e2elog.Failf("failed to get server version with error %v", err)
}
// pvc clone is only supported from v1.16+
if v.Major > "1" || (v.Major == "1" && v.Minor >= "16") {
validatePVCClone(rawPvcPath, pvcBlockSmartClonePath, appBlockSmartClonePath, f)
}
})
By("create/delete multiple PVCs and Apps", func() {
totalCount := 2
pvc, err := loadPVC(pvcPath)