mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-12-18 02:50:30 +00:00
e2e: add backend validation of cephfs pvc
added a backend validation to check subvolumes count when we create and delete pvc. fixes #1316 Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
parent
141b89f514
commit
2307687dc2
@ -232,8 +232,12 @@ var _ = Describe("cephfs", func() {
|
||||
}
|
||||
|
||||
}
|
||||
// TODO add cephfs backend validation
|
||||
|
||||
subVol := listCephFSSubVolumes(f, "myfs", subvolumegroup)
|
||||
if len(subVol) != totalCount {
|
||||
msg := fmt.Sprintf("subvolumes %v. subvolume count %d not matching expected count %v", subVol, len(subVol), totalCount)
|
||||
e2elog.Logf(msg)
|
||||
Fail(msg)
|
||||
}
|
||||
// delete pvc and app
|
||||
for i := 0; i < totalCount; i++ {
|
||||
name := fmt.Sprintf("%s%d", f.UniqueName, i)
|
||||
@ -243,6 +247,12 @@ var _ = Describe("cephfs", func() {
|
||||
}
|
||||
|
||||
}
|
||||
subVol = listCephFSSubVolumes(f, "myfs", subvolumegroup)
|
||||
if len(subVol) != 0 {
|
||||
msg := fmt.Sprintf("subvolumes %v. subvolume count %d not matching expected count %v", subVol, len(subVol), 0)
|
||||
e2elog.Logf(msg)
|
||||
Fail(msg)
|
||||
}
|
||||
})
|
||||
|
||||
By("check data persist after recreating pod with same pvc", func() {
|
||||
|
Loading…
Reference in New Issue
Block a user