grpcmock icon indicating copy to clipboard operation
grpcmock copied to clipboard

Docker support and remote java client

Open dtuchs opened this issue 3 years ago • 3 comments

First of all I want to thank you for this simple solution for grpc mocking, it's really useful in unit tests! But sometimes we would like the grpcmock to be called not directly from tests, but from another service (yep, I'm talking about end-2-end tests for several microservices) WireMock and mock-server already support running as stateful service in docker, and I'm sure many developers will be happy to get a similar solution for gRPC. Also, gripmock already supports standalone running in docker, but they don't have a remote client, there is only REST API. Of course, it is possible to implement “WireMock-style” simple client for gripmock, but first I wanted to ask if you have any plans to do something like that in the future? Thanks!

dtuchs avatar Mar 04 '21 10:03 dtuchs

Hey @dtuchs, I glad you've found grpcmock useful! Initially for me it was only about mocking gRPC services in unit/it tests, and I've never though about creating a client for e2e. But I think that definitely should be possible. Tho it would have reduced matching possibilities (you can't jsonize a predicate), probably similar to gripmock - equals and contains. Also not sure about bidistreaming api definitions (that's a thing to improve on the DSL as well). I didn't get the part were gripmock doesn't have a remote client? I seems it does provide a Dockerfile, which could be used to run the client?

Fadelis avatar Mar 04 '21 11:03 Fadelis

Hi @Fadelis

Yes Docker support is something which will be highly useful. Is there any near future plan for this to get Docker support to run remotely via a java client ?

nitink007 avatar Oct 15 '22 03:10 nitink007

Hi @Fadelis

Yes Docker support is something which will be highly useful. Is there any near future plan for this to get Docker support to run remotely via a java client ?

Hi @nitink007 I have no plans for it atm, since it would require quite a different structure to support this (loading proto files to docker container, parsing and loading json scenarios and etc). As mentioned in the other linked issue you could check out https://github.com/Adven27/grpc-wiremock project, maybe it will suit your needs.

Fadelis avatar Oct 26 '22 07:10 Fadelis