Skip to content

Commit

Permalink
e2e: add backend validation of cephfs pvc
Browse files Browse the repository at this point in the history
added a backend validation to check subvolumes
count when we create and delete pvc.

fixes #1316

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
  • Loading branch information
Madhu-1 authored and mergify-bot committed Aug 6, 2020
1 parent 307d790 commit 5b58229
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions e2e/cephfs.go
Original file line number Diff line number Diff line change
Expand Up @@ -225,8 +225,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)
Expand All @@ -236,6 +240,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() {
Expand Down

0 comments on commit 5b58229

Please sign in to comment.