diff --git a/pkg/nfs/nodeserver_test.go b/pkg/nfs/nodeserver_test.go index 03fce0af..708f2167 100644 --- a/pkg/nfs/nodeserver_test.go +++ b/pkg/nfs/nodeserver_test.go @@ -133,7 +133,7 @@ func TestNodeUnpublishVolume(t *testing.T) { errorTarget := testutil.GetWorkDirPath("error_is_likely_target", t) targetTest := testutil.GetWorkDirPath("target_test", t) - targetFile := testutil.GetWorkDirPath("abc.go", t) + //targetFile := testutil.GetWorkDirPath("abc.go", t) tests := []struct { desc string @@ -152,16 +152,20 @@ func TestNodeUnpublishVolume(t *testing.T) { req: csi.NodeUnpublishVolumeRequest{VolumeId: "vol_1"}, expectedErr: status.Error(codes.InvalidArgument, "Target path missing in request"), }, + /* Not relevant due to carry patch https://github.com/openshift/csi-driver-nfs/commit/59fe400d433137c48de81650026922a88e167177 + // Downstream doesn't call IsLikelyNotMountPoint, and doesn't raise any error if the target is not mounted { desc: "[Error] Unmount error mocked by IsLikelyNotMountPoint", req: csi.NodeUnpublishVolumeRequest{TargetPath: errorTarget, VolumeId: "vol_1"}, expectedErr: status.Error(codes.Internal, "fake IsLikelyNotMountPoint: fake error"), }, + // Downstream doesn't raise any error if the target is not mounted { desc: "[Error] Volume not mounted", req: csi.NodeUnpublishVolumeRequest{TargetPath: targetFile, VolumeId: "vol_1"}, expectedErr: status.Error(codes.NotFound, "Volume not mounted"), }, + */ } // Setup