e2e: add e2e for static PVC without imageFeature parameter

This commit adds e2e to make sure static PVC without imageFeatures
parameter fail with proper error event.

Signed-off-by: Rakshith R <rar@redhat.com>
This commit is contained in:
Rakshith R
2021-06-15 15:38:51 +05:30
committed by mergify[bot]
parent 7fc553a3a7
commit 82a204bfd3
8 changed files with 48 additions and 11 deletions

View File

@ -1051,7 +1051,7 @@ var _ = Describe("RBD", func() {
})
By("validate RBD static FileSystem PVC", func() {
err := validateRBDStaticPV(f, appPath, false)
err := validateRBDStaticPV(f, appPath, false, false)
if err != nil {
e2elog.Failf("failed to validate rbd static pv with error %v", err)
}
@ -1060,7 +1060,7 @@ var _ = Describe("RBD", func() {
})
By("validate RBD static Block PVC", func() {
err := validateRBDStaticPV(f, rawAppPath, true)
err := validateRBDStaticPV(f, rawAppPath, true, false)
if err != nil {
e2elog.Failf("failed to validate rbd block pv with error %v", err)
}
@ -1068,6 +1068,15 @@ var _ = Describe("RBD", func() {
validateRBDImageCount(f, 0, defaultRBDPool)
})
By("validate failure of RBD static PVC without imageFeatures parameter", func() {
err := validateRBDStaticPV(f, rawAppPath, true, true)
if err != nil {
e2elog.Failf("Validation of static PVC without imageFeatures parameter failed with err %v", err)
}
// validate created backend rbd images
validateRBDImageCount(f, 0, defaultRBDPool)
})
By("validate mount options in app pod", func() {
mountFlags := []string{"discard"}
err := checkMountOptions(pvcPath, appPath, f, mountFlags)