From d3bc8bcfe96ab92490778cc64ad5318b2997d196 Mon Sep 17 00:00:00 2001 From: Timo Reimann Date: Fri, 17 Apr 2020 09:24:19 +0200 Subject: [PATCH] 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. https://github.com/container-storage-interface/spec/issues/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. --- pkg/sanity/node.go | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/pkg/sanity/node.go b/pkg/sanity/node.go index 64345c18..92215212 100644 --- a/pkg/sanity/node.go +++ b/pkg/sanity/node.go @@ -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() {