e2e: validate storing of csi.volume.owner attribute

The csi.volume.owner should get stored when the csi-provisioner sidecar
passes additional metadata. This option is now enabled by default, so
the owner (Kubernetes Namespace) of RBD images is expected to be
available.

Signed-off-by: Niels de Vos <ndevos@redhat.com>
This commit is contained in:
Niels de Vos
2020-11-26 11:44:22 +01:00
committed by mergify[bot]
parent 16cb43f0f9
commit bccd5cef46
2 changed files with 61 additions and 1 deletions

View File

@ -260,6 +260,15 @@ var _ = Describe("RBD", func() {
}
})
By("create a PVC and validate owner", func() {
err := validateImageOwner(pvcPath, f)
if err != nil {
e2elog.Failf("failed to validate owner of pvc with error %v", err)
}
// validate created backend rbd images
validateRBDImageCount(f, 0)
})
By("create a PVC and bind it to an app", func() {
err := validatePVCAndAppBinding(pvcPath, appPath, f)
if err != nil {
@ -1109,8 +1118,15 @@ var _ = Describe("RBD", func() {
updateConfigMap("e2e-ns")
err := validateImageOwner(pvcPath, f)
if err != nil {
e2elog.Failf("failed to validate owner of pvc with error %v", err)
}
// validate created backend rbd images
validateRBDImageCount(f, 0)
// Create a PVC and bind it to an app within the namesapce
err := validatePVCAndAppBinding(pvcPath, appPath, f)
err = validatePVCAndAppBinding(pvcPath, appPath, f)
if err != nil {
e2elog.Failf("failed to validate pvc and application binding with error %v", err)
}