test: fix ut
This commit is contained in:
parent
9058c86fd8
commit
f19db6ef3e
@ -19,7 +19,6 @@ package nfs
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
|
||||||
"os"
|
"os"
|
||||||
"reflect"
|
"reflect"
|
||||||
"strings"
|
"strings"
|
||||||
@ -217,11 +216,6 @@ func TestNodeUnpublishVolume(t *testing.T) {
|
|||||||
req: csi.NodeUnpublishVolumeRequest{VolumeId: "vol_1"},
|
req: csi.NodeUnpublishVolumeRequest{VolumeId: "vol_1"},
|
||||||
expectedErr: status.Error(codes.InvalidArgument, "Target path missing in request"),
|
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",
|
desc: "[Success] Volume not mounted",
|
||||||
req: csi.NodeUnpublishVolumeRequest{TargetPath: targetFile, VolumeId: "vol_1"},
|
req: csi.NodeUnpublishVolumeRequest{TargetPath: targetFile, VolumeId: "vol_1"},
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user