mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-09 16:00:22 +00:00
e2e: update cephfs ROX test case
updated cephfs ROX test case to create
ROX Clone PVC instead of creating an empty PVC
Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
(cherry picked from commit be3a78afaf
)
This commit is contained in:
parent
d7e3f06384
commit
cb09a3583e
@ -693,7 +693,18 @@ var _ = Describe("cephfs", func() {
|
||||
}
|
||||
|
||||
pvc.Namespace = f.UniqueName
|
||||
pvc.Spec.AccessModes = []v1.PersistentVolumeAccessMode{v1.ReadOnlyMany}
|
||||
err = createPVCAndvalidatePV(f.ClientSet, pvc, deployTimeout)
|
||||
if err != nil {
|
||||
e2elog.Failf("failed to create PVC with error %v", err)
|
||||
}
|
||||
|
||||
pvcClone, err := loadPVC(pvcSmartClonePath)
|
||||
if err != nil {
|
||||
e2elog.Failf("failed to load PVC with error %v", err)
|
||||
}
|
||||
pvcClone.Namespace = f.UniqueName
|
||||
pvcClone.Spec.DataSource.Name = pvc.Name
|
||||
pvcClone.Spec.AccessModes = []v1.PersistentVolumeAccessMode{v1.ReadOnlyMany}
|
||||
app, err := loadApp(appPath)
|
||||
if err != nil {
|
||||
e2elog.Failf("failed to load application with error %v", err)
|
||||
@ -704,8 +715,8 @@ var _ = Describe("cephfs", func() {
|
||||
"app": app.Name,
|
||||
}
|
||||
app.Labels = label
|
||||
app.Spec.Volumes[0].PersistentVolumeClaim.ClaimName = pvc.Name
|
||||
err = createPVCAndApp("", f, pvc, app, deployTimeout)
|
||||
app.Spec.Volumes[0].PersistentVolumeClaim.ClaimName = pvcClone.Name
|
||||
err = createPVCAndApp("", f, pvcClone, app, deployTimeout)
|
||||
if err != nil {
|
||||
e2elog.Failf("failed to create PVC or application with error %v", err)
|
||||
}
|
||||
@ -721,11 +732,17 @@ var _ = Describe("cephfs", func() {
|
||||
e2elog.Failf(stdErr)
|
||||
}
|
||||
|
||||
// delete PVC and app
|
||||
err = deletePVCAndApp("", f, pvc, app)
|
||||
// delete cloned ROX pvc and app
|
||||
err = deletePVCAndApp("", f, pvcClone, app)
|
||||
if err != nil {
|
||||
e2elog.Failf("failed to delete PVC or application with error %v", err)
|
||||
}
|
||||
|
||||
// delete parent pvc
|
||||
err = deletePVCAndValidatePV(f.ClientSet, pvc, deployTimeout)
|
||||
if err != nil {
|
||||
e2elog.Failf("failed to delete PVC with error %v", err)
|
||||
}
|
||||
})
|
||||
// Make sure this should be last testcase in this file, because
|
||||
// it deletes pool
|
||||
|
Loading…
Reference in New Issue
Block a user