Skip to content

Commit d3bc8bc

Browse files
committed
Delete missing volume test case for NodeUnpublishVolume
The "should fail when the volume is missing" test for NodeUnpublishVolume verifies that a NotFound error occurs when the endpoint is invoked for a missing volume. However, this expectation really only holds for volume types that are locally attached, such as local disks or iscsi. Specifically, it would not hold for network-attached storage where it is fine to return Ok if the mount point does not exist. container-storage-interface/spec#433 was filed to improve the spec in this regard. For now we remove the test as it seems to block more people than it helps.
1 parent 661a3cb commit d3bc8bc

File tree

1 file changed

+0
-15
lines changed

1 file changed

+0
-15
lines changed

pkg/sanity/node.go

-15
Original file line numberDiff line numberDiff line change
@@ -419,21 +419,6 @@ var _ = DescribeSanity("Node Service", func(sc *TestContext) {
419419
Expect(ok).To(BeTrue())
420420
Expect(serverError.Code()).To(Equal(codes.InvalidArgument))
421421
})
422-
423-
It("should fail when the volume is missing", func() {
424-
425-
_, err := c.NodeUnpublishVolume(
426-
context.Background(),
427-
&csi.NodeUnpublishVolumeRequest{
428-
VolumeId: sc.Config.IDGen.GenerateUniqueValidVolumeID(),
429-
TargetPath: sc.StagingPath,
430-
})
431-
Expect(err).To(HaveOccurred(), "failed to unpublish volume from node")
432-
433-
serverError, ok := status.FromError(err)
434-
Expect(ok).To(BeTrue(), "error from NodeUnpublishVolume is not a gRPC error")
435-
Expect(serverError.Code()).To(Equal(codes.NotFound), "unexpected error code")
436-
})
437422
})
438423

439424
Describe("NodeStageVolume", func() {

0 commit comments

Comments
 (0)