add e2e test for bound/unbound pv/pvc count metrics

This commit is contained in:
mlmhl
2018-01-12 17:10:46 +08:00
parent 6f83110e77
commit 6d52cda692
3 changed files with 189 additions and 0 deletions

View File

@@ -263,6 +263,11 @@ func createPV(c clientset.Interface, pv *v1.PersistentVolume) (*v1.PersistentVol
return pv, nil
}
// create the PV resource. Fails test on error.
func CreatePV(c clientset.Interface, pv *v1.PersistentVolume) (*v1.PersistentVolume, error) {
return createPV(c, pv)
}
// create the PVC resource. Fails test on error.
func CreatePVC(c clientset.Interface, ns string, pvc *v1.PersistentVolumeClaim) (*v1.PersistentVolumeClaim, error) {
pvc, err := c.CoreV1().PersistentVolumeClaims(ns).Create(pvc)