e2e: add testing for controller

This commits adds an E2E testing
to verify the metadata created by controller,
We are not checking the generated omap data,
but we will be verify PVC resize and binding
pvc to application.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
Madhu Rajanna
2020-10-28 13:13:52 +05:30
committed by mergify[bot]
parent 0dd152928d
commit 4fcd649fa7
4 changed files with 240 additions and 0 deletions

View File

@ -1241,6 +1241,23 @@ var _ = Describe("RBD", func() {
}
})
By("validate the functionality of controller", func() {
err := deleteResource(rbdExamplePath + "storageclass.yaml")
if err != nil {
e2elog.Failf("failed to delete storageclass with error %v", err)
}
err = validateController(f, pvcPath, appPath, rbdExamplePath+"storageclass.yaml")
if err != nil {
e2elog.Failf("failed to validate controller with error %v", err)
}
// validate created backend rbd images
validateRBDImageCount(f, 0)
err = createRBDStorageClass(f.ClientSet, f, nil, nil, deletePolicy)
if err != nil {
e2elog.Failf("failed to create storageclass with error %v", err)
}
})
// 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() {