Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Usage example of GRPC is unclear #84

Open
sergei-pankratov opened this issue Feb 18, 2021 · 1 comment
Open

Usage example of GRPC is unclear #84

sergei-pankratov opened this issue Feb 18, 2021 · 1 comment

Comments

@sergei-pankratov
Copy link

Hi!

I launched openmock by running docker-compose and by setting OPENMOCK_GRPC_ENABLED and OPENMOCK_GRPC_PORT
Then I made a GRPC request to demo_probuf.ExampleService.ExampleMethod
Request timed out and I see following in logs:

     openmock         | {"error":"empty GRPCServiceMap","level":"error","msg":"failed to convert gRPC request body to JSON","time":"2021-02-18T06:42:30Z"}
     openmock         | {"grpc_host":"localhost:50051","grpc_method":"POST","grpc_path":"/demo_protobuf.ExampleService/ExampleMethod","grpc_req":"\u0000\u0000\u0000\u0000\u000e\u0008{\u0012\u0006fooBar\u001a\u0002{{","grpc_res":"{\"message\":\"Internal Server Error\"}\n","level":"info","msg":"","time":"2021-02-18T06:42:30Z"}

I tried to find what that error means in source code and the only place where GRPCServiceMap is assigned is in /grpc_test.go
Does that mean that currently in order to use GRPC mocking one has to write a Go wrapper project?

Thanks!

Sidenote: I'd like to say that it took me some time to find out that one has to enable GRPC by setting OPENMOCK_GRPC_ENABLED
At first I just set OPENMOCK_GRPC_PORT and expected it to work 😅 since a Kafka configuration example which is a few lines below mentions OPENMOCK_KAFKA_ENABLED flag. Perhaps Readme.md should mention OPENMOCK_GRPC_ENABLED

@1755
Copy link

1755 commented Sep 20, 2022

@tehnetaholic Hi! Did you find a workaround? I'm getting the same error with two console clients

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants