LukeMathWalker/wiremock-rs

GRPC support

marlon-sousa opened this issue · 1 comments

Hello,

I have a question for which I didn't find a answer.

How easy would it be to support GRPC mocking on wiremock-rs?

The api would be the same:

  1. You start a server.
  2. You provide stubs for requests, by specifing service name / method / request message (or matchers)
  3. You provide a suitable response on match.
  4. You provide a way of investigating if a call was performed to this stub on this server.

I have been searching for crates which allow this kind of thing because it would enable easy integration testing of microservices which have to call grpc end points as part of their execution flow.

Using grip mock strategy, which is to translate grpc message to JSON, call wiremock, get response and translate that to GRPC again appears to be a good idea. Never the less as I am not really fammiliar with all of that I thought asking here would be a good idea.

Do you think something like this could be implemented?

Thanks,
Marlon

It's unfortunately fairly complicated - I explored the idea a while ago and I didn't manage to build an ergonomic API.
It is out of scope for wiremock for the foreseeable future.