File tree 1 file changed +22
-0
lines changed
1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -391,6 +391,28 @@ var _ = DescribeSanity("Node Service", func(sc *TestContext) {
391
391
Expect (ok ).To (BeTrue ())
392
392
Expect (serverError .Code ()).To (Equal (codes .InvalidArgument ))
393
393
})
394
+
395
+ It ("should fail when the volume is missing" , func () {
396
+ stagingPath := ""
397
+ if nodeStageSupported {
398
+ stagingPath = sc .StagingPath
399
+ }
400
+
401
+ _ , err := c .NodePublishVolume (
402
+ context .Background (),
403
+ & csi.NodePublishVolumeRequest {
404
+ VolumeId : sc .Config .IDGen .GenerateUniqueValidVolumeID (),
405
+ VolumeCapability : TestVolumeCapabilityWithAccessType (sc , csi .VolumeCapability_AccessMode_SINGLE_NODE_WRITER ),
406
+ StagingTargetPath : stagingPath ,
407
+ TargetPath : sc .TargetPath + "/target" ,
408
+ Secrets : sc .Secrets .NodePublishVolumeSecret ,
409
+ })
410
+ Expect (err ).To (HaveOccurred ())
411
+
412
+ serverError , ok := status .FromError (err )
413
+ Expect (ok ).To (BeTrue ())
414
+ Expect (serverError .Code ()).To (Equal (codes .NotFound ))
415
+ })
394
416
})
395
417
396
418
Describe ("NodeUnpublishVolume" , func () {
You can’t perform that action at this time.
0 commit comments