From 42d6130cbcf64c737bc792598f01ac329a8e600e Mon Sep 17 00:00:00 2001 From: Madhu Rajanna Date: Mon, 10 Jan 2022 10:35:02 +0530 Subject: [PATCH] e2e: cephfs e2e for bigger size clone,restore pvc adding E2E to verify the bigger size clone and restore pvc from a smaller size pvc/snapshot. Signed-off-by: Madhu Rajanna --- e2e/cephfs.go | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/e2e/cephfs.go b/e2e/cephfs.go index b1ce48f5d..61a9b0ec1 100644 --- a/e2e/cephfs.go +++ b/e2e/cephfs.go @@ -1261,6 +1261,34 @@ var _ = Describe("cephfs", func() { e2elog.Failf("failed to delete PVC: %v", err) } }) + + By("restore snapshot to a bigger size PVC", func() { + err := validateBiggerPVCFromSnapshot(f, + pvcPath, + appPath, + snapshotPath, + pvcClonePath, + appClonePath) + if err != nil { + e2elog.Failf("failed to validate restore bigger size clone: %v", err) + } + + validateSubvolumeCount(f, 0, fileSystemName, subvolumegroup) + }) + + By("clone PVC to a bigger size PVC", func() { + err := validateBiggerCloneFromPVC(f, + pvcPath, + appPath, + pvcSmartClonePath, + appSmartClonePath) + if err != nil { + e2elog.Failf("failed to validate bigger size clone: %v", err) + } + + validateSubvolumeCount(f, 0, fileSystemName, subvolumegroup) + }) + // Make sure this should be last testcase in this file, because // it deletes pool By("Create a PVC and delete PVC when backend pool deleted", func() {