File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -88,6 +88,8 @@ go_test(
88
88
"//staging/src/k8s.io/component-base/featuregate/testing:go_default_library" ,
89
89
"//vendor/github.com/container-storage-interface/spec/lib/go/csi:go_default_library" ,
90
90
"//vendor/github.com/stretchr/testify/assert:go_default_library" ,
91
+ "//vendor/google.golang.org/grpc/codes:go_default_library" ,
92
+ "//vendor/google.golang.org/grpc/status:go_default_library" ,
91
93
"//vendor/k8s.io/klog:go_default_library" ,
92
94
],
93
95
)
Original file line number Diff line number Diff line change @@ -18,12 +18,14 @@ package csi
18
18
19
19
import (
20
20
"context"
21
- "errors"
22
21
"fmt"
23
22
"os"
24
23
"path/filepath"
25
24
"testing"
26
25
26
+ "google.golang.org/grpc/codes"
27
+ "google.golang.org/grpc/status"
28
+
27
29
api "k8s.io/api/core/v1"
28
30
"k8s.io/api/storage/v1beta1"
29
31
meta "k8s.io/apimachinery/pkg/apis/meta/v1"
@@ -299,7 +301,7 @@ func TestBlockMapperSetupDeviceError(t *testing.T) {
299
301
300
302
csiMapper .csiClient = setupClient (t , true )
301
303
fClient := csiMapper .csiClient .(* fakeCsiDriverClient )
302
- fClient .nodeClient .SetNextError (errors . New ( "mock final error" ))
304
+ fClient .nodeClient .SetNextError (status . Error ( codes . InvalidArgument , "mock final error" ))
303
305
304
306
attachID := getAttachmentName (csiMapper .volumeID , string (csiMapper .driverName ), string (nodeName ))
305
307
attachment := makeTestAttachment (attachID , nodeName , pvName )
You can’t perform that action at this time.
0 commit comments