Skip to content

Commit

Permalink
change the name of UnaryServerInterceptor's return (#361)
Browse files Browse the repository at this point in the history
  • Loading branch information
catundercar authored Nov 12, 2020
1 parent 49f29dc commit c05cb40
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ratelimit/ratelimit_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ func TestUnaryServerInterceptor_RateLimitPass(t *testing.T) {
info := &grpc.UnaryServerInfo{
FullMethod: "FakeMethod",
}
req, err := interceptor(nil, nil, info, handler)
assert.Nil(t, req)
resp, err := interceptor(nil, nil, info, handler)
assert.Nil(t, resp)
assert.EqualError(t, err, errMsgFake)
}

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

Expand Down

0 comments on commit c05cb40

Please sign in to comment.