Skip to content

Commit c05cb40

Browse files
authored
change the name of UnaryServerInterceptor's return (#361)
1 parent 49f29dc commit c05cb40

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

ratelimit/ratelimit_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ func TestUnaryServerInterceptor_RateLimitPass(t *testing.T) {
2626
info := &grpc.UnaryServerInfo{
2727
FullMethod: "FakeMethod",
2828
}
29-
req, err := interceptor(nil, nil, info, handler)
30-
assert.Nil(t, req)
29+
resp, err := interceptor(nil, nil, info, handler)
30+
assert.Nil(t, resp)
3131
assert.EqualError(t, err, errMsgFake)
3232
}
3333

@@ -45,8 +45,8 @@ func TestUnaryServerInterceptor_RateLimitFail(t *testing.T) {
4545
info := &grpc.UnaryServerInfo{
4646
FullMethod: "FakeMethod",
4747
}
48-
req, err := interceptor(nil, nil, info, handler)
49-
assert.Nil(t, req)
48+
resp, err := interceptor(nil, nil, info, handler)
49+
assert.Nil(t, resp)
5050
assert.EqualError(t, err, "rpc error: code = ResourceExhausted desc = FakeMethod is rejected by grpc_ratelimit middleware, please retry later.")
5151
}
5252

0 commit comments

Comments
 (0)