mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-12-18 11:00:25 +00:00
e2e: Introduce e2e test for block mode PVC
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
This commit is contained in:
parent
5763e996af
commit
25400a7334
13
e2e/rbd.go
13
e2e/rbd.go
@ -239,8 +239,10 @@ var _ = Describe("RBD", func() {
|
|||||||
rawAppPath := rbdExamplePath + "raw-block-pod.yaml"
|
rawAppPath := rbdExamplePath + "raw-block-pod.yaml"
|
||||||
pvcClonePath := rbdExamplePath + "pvc-restore.yaml"
|
pvcClonePath := rbdExamplePath + "pvc-restore.yaml"
|
||||||
pvcSmartClonePath := rbdExamplePath + "pvc-clone.yaml"
|
pvcSmartClonePath := rbdExamplePath + "pvc-clone.yaml"
|
||||||
|
pvcBlockSmartClonePath := rbdExamplePath + "pvc-block-clone.yaml"
|
||||||
appClonePath := rbdExamplePath + "pod-restore.yaml"
|
appClonePath := rbdExamplePath + "pod-restore.yaml"
|
||||||
appSmartClonePath := rbdExamplePath + "pod-clone.yaml"
|
appSmartClonePath := rbdExamplePath + "pod-clone.yaml"
|
||||||
|
appBlockSmartClonePath := rbdExamplePath + "block-pod-clone.yaml"
|
||||||
snapshotPath := rbdExamplePath + "snapshot.yaml"
|
snapshotPath := rbdExamplePath + "snapshot.yaml"
|
||||||
|
|
||||||
By("checking provisioner deployment is running", func() {
|
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)
|
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() {
|
By("create/delete multiple PVCs and Apps", func() {
|
||||||
totalCount := 2
|
totalCount := 2
|
||||||
pvc, err := loadPVC(pvcPath)
|
pvc, err := loadPVC(pvcPath)
|
||||||
|
Loading…
Reference in New Issue
Block a user