@@ -87,10 +87,6 @@ var _ = DescribeSanity("Node Service", func(sc *SanityContext) {
8787 s ,
8888 csi .ControllerServiceCapability_RPC_PUBLISH_UNPUBLISH_VOLUME )
8989 nodeStageSupported = isNodeCapabilitySupported (c , csi .NodeServiceCapability_RPC_STAGE_UNSTAGE_VOLUME )
90- if nodeStageSupported {
91- err := createMountTargetLocation (sc .Config .StagingPath )
92- Expect (err ).NotTo (HaveOccurred ())
93- }
9490 nodeVolumeStatsSupported = isNodeCapabilitySupported (c , csi .NodeServiceCapability_RPC_GET_VOLUME_STATS )
9591 cl = & Cleanup {
9692 Context : sc ,
@@ -191,7 +187,7 @@ var _ = DescribeSanity("Node Service", func(sc *SanityContext) {
191187 context .Background (),
192188 & csi.NodePublishVolumeRequest {
193189 VolumeId : "id" ,
194- TargetPath : sc .Config . TargetPath ,
190+ TargetPath : sc .targetPath ,
195191 Secrets : sc .Secrets .NodePublishVolumeSecret ,
196192 },
197193 )
@@ -248,7 +244,7 @@ var _ = DescribeSanity("Node Service", func(sc *SanityContext) {
248244 _ , err := c .NodeStageVolume (
249245 context .Background (),
250246 & csi.NodeStageVolumeRequest {
251- StagingTargetPath : sc .Config . StagingPath ,
247+ StagingTargetPath : sc .stagingPath ,
252248 VolumeCapability : & csi.VolumeCapability {
253249 AccessType : & csi.VolumeCapability_Mount {
254250 Mount : & csi.VolumeCapability_MountVolume {},
@@ -330,7 +326,7 @@ var _ = DescribeSanity("Node Service", func(sc *SanityContext) {
330326 context .Background (),
331327 & csi.NodeStageVolumeRequest {
332328 VolumeId : vol .GetVolume ().GetVolumeId (),
333- StagingTargetPath : sc .Config . StagingPath ,
329+ StagingTargetPath : sc .stagingPath ,
334330 PublishContext : map [string ]string {
335331 "device" : device ,
336332 },
@@ -369,7 +365,7 @@ var _ = DescribeSanity("Node Service", func(sc *SanityContext) {
369365 _ , err := c .NodeUnstageVolume (
370366 context .Background (),
371367 & csi.NodeUnstageVolumeRequest {
372- StagingTargetPath : sc .Config . StagingPath ,
368+ StagingTargetPath : sc .stagingPath ,
373369 })
374370 Expect (err ).To (HaveOccurred ())
375371
@@ -520,7 +516,7 @@ var _ = DescribeSanity("Node Service", func(sc *SanityContext) {
520516 Mode : csi .VolumeCapability_AccessMode_SINGLE_NODE_WRITER ,
521517 },
522518 },
523- StagingTargetPath : sc .Config . StagingPath ,
519+ StagingTargetPath : sc .stagingPath ,
524520 VolumeContext : vol .GetVolume ().GetVolumeContext (),
525521 PublishContext : conpubvol .GetPublishContext (),
526522 Secrets : sc .Secrets .NodeStageVolumeSecret ,
@@ -533,13 +529,13 @@ var _ = DescribeSanity("Node Service", func(sc *SanityContext) {
533529 By ("publishing the volume on a node" )
534530 var stagingPath string
535531 if nodeStageSupported {
536- stagingPath = sc .Config . StagingPath
532+ stagingPath = sc .stagingPath
537533 }
538534 nodepubvol , err := c .NodePublishVolume (
539535 context .Background (),
540536 & csi.NodePublishVolumeRequest {
541537 VolumeId : vol .GetVolume ().GetVolumeId (),
542- TargetPath : sc .Config . TargetPath ,
538+ TargetPath : sc .targetPath ,
543539 StagingTargetPath : stagingPath ,
544540 VolumeCapability : & csi.VolumeCapability {
545541 AccessType : & csi.VolumeCapability_Mount {
@@ -578,7 +574,7 @@ var _ = DescribeSanity("Node Service", func(sc *SanityContext) {
578574 context .Background (),
579575 & csi.NodeUnpublishVolumeRequest {
580576 VolumeId : vol .GetVolume ().GetVolumeId (),
581- TargetPath : sc .Config . TargetPath ,
577+ TargetPath : sc .targetPath ,
582578 })
583579 Expect (err ).NotTo (HaveOccurred ())
584580 Expect (nodeunpubvol ).NotTo (BeNil ())
@@ -589,7 +585,7 @@ var _ = DescribeSanity("Node Service", func(sc *SanityContext) {
589585 context .Background (),
590586 & csi.NodeUnstageVolumeRequest {
591587 VolumeId : vol .GetVolume ().GetVolumeId (),
592- StagingTargetPath : sc .Config . StagingPath ,
588+ StagingTargetPath : sc .stagingPath ,
593589 },
594590 )
595591 Expect (err ).NotTo (HaveOccurred ())
@@ -704,7 +700,7 @@ var _ = DescribeSanity("Node Service", func(sc *SanityContext) {
704700 Mode : csi .VolumeCapability_AccessMode_SINGLE_NODE_WRITER ,
705701 },
706702 },
707- StagingTargetPath : sc .Config . StagingPath ,
703+ StagingTargetPath : sc .stagingPath ,
708704 VolumeContext : vol .GetVolume ().GetVolumeContext (),
709705 PublishContext : conpubvol .GetPublishContext (),
710706 Secrets : sc .Secrets .NodeStageVolumeSecret ,
@@ -717,13 +713,13 @@ var _ = DescribeSanity("Node Service", func(sc *SanityContext) {
717713 By ("publishing the volume on a node" )
718714 var stagingPath string
719715 if nodeStageSupported {
720- stagingPath = sc .Config . StagingPath
716+ stagingPath = sc .stagingPath
721717 }
722718 nodepubvol , err := c .NodePublishVolume (
723719 context .Background (),
724720 & csi.NodePublishVolumeRequest {
725721 VolumeId : vol .GetVolume ().GetVolumeId (),
726- TargetPath : sc .Config . TargetPath ,
722+ TargetPath : sc .targetPath ,
727723 StagingTargetPath : stagingPath ,
728724 VolumeCapability : & csi.VolumeCapability {
729725 AccessType : & csi.VolumeCapability_Mount {
@@ -748,7 +744,7 @@ var _ = DescribeSanity("Node Service", func(sc *SanityContext) {
748744 context .Background (),
749745 & csi.NodeGetVolumeStatsRequest {
750746 VolumeId : vol .GetVolume ().GetVolumeId (),
751- VolumePath : sc .Config . TargetPath ,
747+ VolumePath : sc .targetPath ,
752748 },
753749 )
754750 Expect (err ).ToNot (HaveOccurred ())
@@ -761,7 +757,7 @@ var _ = DescribeSanity("Node Service", func(sc *SanityContext) {
761757 context .Background (),
762758 & csi.NodeUnpublishVolumeRequest {
763759 VolumeId : vol .GetVolume ().GetVolumeId (),
764- TargetPath : sc .Config . TargetPath ,
760+ TargetPath : sc .targetPath ,
765761 })
766762 Expect (err ).NotTo (HaveOccurred ())
767763 Expect (nodeunpubvol ).NotTo (BeNil ())
@@ -772,7 +768,7 @@ var _ = DescribeSanity("Node Service", func(sc *SanityContext) {
772768 context .Background (),
773769 & csi.NodeUnstageVolumeRequest {
774770 VolumeId : vol .GetVolume ().GetVolumeId (),
775- StagingTargetPath : sc .Config . StagingPath ,
771+ StagingTargetPath : sc .stagingPath ,
776772 },
777773 )
778774 Expect (err ).NotTo (HaveOccurred ())
0 commit comments