@@ -51,7 +51,7 @@ func setupServerAndClient(port int) (*PingService, ping.PingServiceClient) {
51
51
52
52
interceptor := ReturnSimpleErrors (nil )
53
53
54
- conn , err := grpc .Dial (fmt .Sprintf (":%d" , port ),
54
+ conn , err := grpc .NewClient (fmt .Sprintf (":%d" , port ),
55
55
grpc .WithUnaryInterceptor (interceptor ),
56
56
grpc .WithTransportCredentials (insecure .NewCredentials ()),
57
57
)
@@ -73,7 +73,7 @@ func TestClientInterceptor(t *testing.T) {
73
73
74
74
st , ok := simplerr .GetAttribute (err , AttrGRPCStatus )
75
75
require .True (t , ok )
76
- require .Equal (t , codes .NotFound , st .(* status.Status ).Code (), "can get the grpc Status" )
76
+ require .Equal (t , codes .NotFound , st .(* status.Status ).Code (), "can get the grpc Status" ) // nolint: errcheck
77
77
78
78
method , ok := simplerr .GetAttribute (err , AttrGRPCMethod )
79
79
require .True (t , ok )
@@ -100,7 +100,7 @@ func TestClientInterceptorNotGPRCError(t *testing.T) {
100
100
101
101
st , ok := simplerr .GetAttribute (err , AttrGRPCStatus )
102
102
require .True (t , ok )
103
- require .Equal (t , codes .Unknown , st .(* status.Status ).Code (), "can get the grpc Status" )
103
+ require .Equal (t , codes .Unknown , st .(* status.Status ).Code (), "can get the grpc Status" ) // nolint: errcheck
104
104
105
105
method , ok := simplerr .GetAttribute (err , AttrGRPCMethod )
106
106
require .True (t , ok )
0 commit comments