mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-13 10:33:35 +00:00
e2e: test for PVC with volumeBindingMode on helm installation
Test PVC binding with WaitForFirstConsumer in Helm installation. Signed-off-by: ShravaniVangur <shravanivangur@gmail.com>
This commit is contained in:
committed by
mergify[bot]
parent
3fa030ead1
commit
c19f47226e
29
e2e/utils.go
29
e2e/utils.go
@ -557,6 +557,35 @@ func validatePVCAndAppBinding(pvcPath, appPath string, f *framework.Framework) e
|
||||
return err
|
||||
}
|
||||
|
||||
// validatePVCAndAppWaitForFirstConsumer creates a Pending PVC, starts an app, and verifies it to become Bound.
|
||||
func validatePVCAndAppWaitForFirstConsumer(pvcPath, appPath string, f *framework.Framework) error {
|
||||
pvc, err := loadPVC(pvcPath)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
pvc.Namespace = f.UniqueName
|
||||
|
||||
app, err := loadApp(appPath)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
app.Namespace = f.UniqueName
|
||||
|
||||
err = createPVC(f.ClientSet, pvc)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
err = createApp(f.ClientSet, app, deployTimeout)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
err = deletePVCAndApp("", f, pvc, app)
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
func getMountType(selector, mountPath string, f *framework.Framework) (string, error) {
|
||||
opt := metav1.ListOptions{
|
||||
LabelSelector: selector,
|
||||
|
Reference in New Issue
Block a user