Skip to content

Commit

Permalink
Delete missing volume test case for NodeUnpublishVolume
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
timoreimann committed May 20, 2020
1 parent 661a3cb commit d3bc8bc
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions pkg/sanity/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -419,21 +419,6 @@ var _ = DescribeSanity("Node Service", func(sc *TestContext) {
Expect(ok).To(BeTrue())
Expect(serverError.Code()).To(Equal(codes.InvalidArgument))
})

It("should fail when the volume is missing", func() {

_, err := c.NodeUnpublishVolume(
context.Background(),
&csi.NodeUnpublishVolumeRequest{
VolumeId: sc.Config.IDGen.GenerateUniqueValidVolumeID(),
TargetPath: sc.StagingPath,
})
Expect(err).To(HaveOccurred(), "failed to unpublish volume from node")

serverError, ok := status.FromError(err)
Expect(ok).To(BeTrue(), "error from NodeUnpublishVolume is not a gRPC error")
Expect(serverError.Code()).To(Equal(codes.NotFound), "unexpected error code")
})
})

Describe("NodeStageVolume", func() {
Expand Down

0 comments on commit d3bc8bc

Please sign in to comment.