Dedupe all Make PVC API object functions into the one MakePersistentVolumeClaim to rule them all

This commit is contained in:
David Zhu
2019-07-19 16:45:04 -07:00
parent 7e806a2dd6
commit e194cf24cc
15 changed files with 206 additions and 151 deletions

View File

@@ -130,8 +130,10 @@ func (p *provisioningTestSuite) defineTests(driver TestDriver, pattern testpatte
if l.sc == nil {
framework.Skipf("Driver %q does not define Dynamic Provision StorageClass - skipping", dInfo.Name)
}
l.pvc = getClaim(claimSize, l.config.Framework.Namespace.Name)
l.pvc.Spec.StorageClassName = &l.sc.Name
l.pvc = framework.MakePersistentVolumeClaim(framework.PersistentVolumeClaimConfig{
ClaimSize: claimSize,
StorageClassName: &(l.sc.Name),
}, l.config.Framework.Namespace.Name)
e2elog.Logf("In creating storage class object and pvc object for driver - sc: %v, pvc: %v", l.sc, l.pvc)
l.testCase = &StorageClassTest{
Client: l.config.Framework.ClientSet,