-
|
I would like to mock certain failure cases in a gRPC protocol. For example, let's say we implemented a rude greeter that would reject anyone named "Nathan": public override Task<HelloReply> SayHello(HelloRequest request, ServerCallContext context)
{
if (request.Name == "Nathan" )
{
throw new RpcException(new Status(StatusCode.FailedPrecondition, "No Nathans!"));
}
return Task.FromResult(new HelloReply
{
Message = $"Hello {request.Name}"
});
}The documentation at https://microcks.io/documentation/tutorials/first-grpc-mock/ and https://microcks.io/documentation/references/artifacts/grpc-conventions/ does not explain how to configure this in the Postman collection, and an attempt or two at doing it myself didn't seem to work. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
|
Hey @phxnsharp |
Beta Was this translation helpful? Give feedback.
Hey @phxnsharp
Did you have a look at #1359? I am on the move at the moment and can not check it in details but IIRC we now have everything to do this.