test: fix ut

This commit is contained in:
andyzhangx 2022-12-23 14:00:39 +00:00
parent 9058c86fd8
commit f19db6ef3e

View File

@ -19,7 +19,6 @@ package nfs
import (
"context"
"errors"
"fmt"
"os"
"reflect"
"strings"
@ -217,11 +216,6 @@ func TestNodeUnpublishVolume(t *testing.T) {
req: csi.NodeUnpublishVolumeRequest{VolumeId: "vol_1"},
expectedErr: status.Error(codes.InvalidArgument, "Target path missing in request"),
},
{
desc: "[Error] Unmount error mocked by IsLikelyNotMountPoint",
req: csi.NodeUnpublishVolumeRequest{TargetPath: errorTarget, VolumeId: "vol_1"},
expectedErr: fmt.Errorf("fake IsLikelyNotMountPoint: fake error"),
},
{
desc: "[Success] Volume not mounted",
req: csi.NodeUnpublishVolumeRequest{TargetPath: targetFile, VolumeId: "vol_1"},