@@ -76,7 +76,7 @@ func (f *Framework) FindPVC(pvcName string) (*k8sv1.PersistentVolumeClaim, error
7676 return utils .FindPVC (f .K8sClient , f .Namespace .Name , pvcName )
7777}
7878
79- // ForceBindPvcIfDvIsWaitForFirstConsumer creates a Pod with the PVC for passed in DV mounted under /dev/ pvc, which forces the PVC to be scheduled and bound.
79+ // ForceBindPvcIfDvIsWaitForFirstConsumer creates a Pod with the PVC for passed in DV mounted under /pvc, which forces the PVC to be scheduled and bound.
8080func (f * Framework ) ForceBindPvcIfDvIsWaitForFirstConsumer (dv * cdiv1.DataVolume ) {
8181 fmt .Fprintf (ginkgo .GinkgoWriter , "verifying pvc was created for dv %s\n " , dv .Name )
8282 // FIXME: #1210, brybacki, tomob this code assumes dvname = pvcname needs to be fixed,
@@ -101,7 +101,7 @@ func (f *Framework) WaitPVCDeletedByUID(pvcSpec *k8sv1.PersistentVolumeClaim, ti
101101 return utils .WaitPVCDeletedByUID (f .K8sClient , pvcSpec , timeout )
102102}
103103
104- // ForceBindIfWaitForFirstConsumer creates a Pod with the passed in PVC mounted under /dev/ pvc, which forces the PVC to be scheduled and bound.
104+ // ForceBindIfWaitForFirstConsumer creates a Pod with the passed in PVC mounted under /pvc, which forces the PVC to be scheduled and bound.
105105func (f * Framework ) ForceBindIfWaitForFirstConsumer (targetPvc * k8sv1.PersistentVolumeClaim ) {
106106 if targetPvc .Spec .VolumeName == "" && f .IsBindingModeWaitForFirstConsumer (targetPvc .Spec .StorageClassName ) {
107107 if targetPvc .Spec .DataSourceRef != nil {
@@ -112,7 +112,7 @@ func (f *Framework) ForceBindIfWaitForFirstConsumer(targetPvc *k8sv1.PersistentV
112112 }
113113}
114114
115- // ForceSchedulingIfWaitForFirstConsumerPopulationPVC creates a Pod with the passed in PVC mounted under /dev/ pvc, which forces the PVC to be scheduled for provisioning.
115+ // ForceSchedulingIfWaitForFirstConsumerPopulationPVC creates a Pod with the passed in PVC mounted under /pvc, which forces the PVC to be scheduled for provisioning.
116116func (f * Framework ) ForceSchedulingIfWaitForFirstConsumerPopulationPVC (targetPvc * k8sv1.PersistentVolumeClaim ) {
117117 if f .IsBindingModeWaitForFirstConsumer (targetPvc .Spec .StorageClassName ) {
118118 createConsumerPodForPopulationPVC (targetPvc , f )
@@ -172,15 +172,15 @@ func VerifyPVCIsEmpty(f *Framework, pvc *k8sv1.PersistentVolumeClaim, node strin
172172 gomega .Expect (err ).ToNot (gomega .HaveOccurred ())
173173 err = f .WaitTimeoutForPodReady (executorPod .Name , utils .PodWaitForTime )
174174 gomega .Expect (err ).ToNot (gomega .HaveOccurred ())
175- output , stderr , err := f .ExecShellInPod (executorPod .Name , f .Namespace .Name , "ls -1 /dev/pvc | wc -l" )
175+ output , stderr , err := f .ExecShellInPod (executorPod .Name , f .Namespace .Name , fmt . Sprintf ( "ls -1 %s | wc -l" , utils . DefaultPvcMountPath ) )
176176 if err != nil {
177177 fmt .Fprintf (ginkgo .GinkgoWriter , "INFO: stderr: [%s]\n " , stderr )
178178 return false , err
179179 }
180180 found := strings .Compare ("0" , output ) == 0
181181 if ! found {
182182 // Could be that a file system was created and it has 'lost+found' directory in it, check again.
183- output , stderr , err := f .ExecShellInPod (executorPod .Name , f .Namespace .Name , "ls -1 /dev/pvc" )
183+ output , stderr , err := f .ExecShellInPod (executorPod .Name , f .Namespace .Name , fmt . Sprintf ( "ls -1 %s" , utils . DefaultPvcMountPath ) )
184184 if err != nil {
185185 fmt .Fprintf (ginkgo .GinkgoWriter , "INFO: stderr: [%s]\n " , stderr )
186186 return false , err
@@ -480,13 +480,13 @@ func (f *Framework) GetEnvVarValue(name string) (importerImage string) {
480480 return ""
481481}
482482
483- // CreateExecutorPodWithPVC creates a Pod with the passed in PVC mounted under /dev/ pvc. You can then use the executor utilities to
483+ // CreateExecutorPodWithPVC creates a Pod with the passed in PVC mounted under /pvc. You can then use the executor utilities to
484484// run commands against the PVC through this Pod.
485485func (f * Framework ) CreateExecutorPodWithPVC (podName , namespace string , pvc * k8sv1.PersistentVolumeClaim , readOnly bool ) (* k8sv1.Pod , error ) {
486486 return utils .CreatePod (f .K8sClient , namespace , f .newExecutorPodWithPVC (podName , pvc , readOnly ))
487487}
488488
489- // CreateExecutorPodWithPVCSpecificNode creates a Pod on a specific node with the passed in PVC mounted under /dev/ pvc. You can then use the executor utilities to
489+ // CreateExecutorPodWithPVCSpecificNode creates a Pod on a specific node with the passed in PVC mounted under /pvc. You can then use the executor utilities to
490490// run commands against the PVC through this Pod.
491491func (f * Framework ) CreateExecutorPodWithPVCSpecificNode (podName , namespace string , pvc * k8sv1.PersistentVolumeClaim , node string , readOnly bool ) (* k8sv1.Pod , error ) {
492492 var pod = f .newExecutorPodWithPVC (podName , pvc , readOnly )
@@ -501,7 +501,7 @@ func (f *Framework) CreateNoopPodWithPVC(podName, namespace string, pvc *k8sv1.P
501501 return utils .CreatePod (f .K8sClient , namespace , f .NewPodWithPVC (podName , "echo I am vm doppleganger pod;" , pvc , true ))
502502}
503503
504- // CreateVerifierPodWithPVC creates a Pod called verifier, with the passed in PVC mounted under /dev/ pvc. You can then use the executor utilities to
504+ // CreateVerifierPodWithPVC creates a Pod called verifier, with the passed in PVC mounted under /pvc. You can then use the executor utilities to
505505// run commands against the PVC through this Pod.
506506func (f * Framework ) CreateVerifierPodWithPVC (namespace string , pvc * k8sv1.PersistentVolumeClaim ) (* k8sv1.Pod , error ) {
507507 return f .CreateExecutorPodWithPVC (utils .VerifierPodName , namespace , pvc , true )
0 commit comments