verifyHealthCheckErrCode is a helper function to verify that a unary health check RPC returns an error with a code set to 'wantCode'.
(t *testing.T, d time.Duration, cc *grpc.ClientConn, service string, wantCode codes.Code)
| 887 | // verifyHealthCheckErrCode is a helper function to verify that a unary health |
| 888 | // check RPC returns an error with a code set to 'wantCode'. |
| 889 | func verifyHealthCheckErrCode(t *testing.T, d time.Duration, cc *grpc.ClientConn, service string, wantCode codes.Code) { |
| 890 | t.Helper() |
| 891 | if _, err := healthCheck(d, cc, service); status.Code(err) != wantCode { |
| 892 | t.Fatalf("Health/Check() got errCode %v, want %v", status.Code(err), wantCode) |
| 893 | } |
| 894 | } |
| 895 | |
| 896 | // newHealthCheckStream is a helper function to start a health check streaming |
| 897 | // RPC, and returns the stream. |
no test coverage detected