wiremock / wiremock-grpc-extension

WireMock Extension: gRPC mocking
https://wiremock.org/docs/grpc/
Apache License 2.0
15 stars 8 forks source link

Delay and fault #39

Open walkerus opened 9 months ago

walkerus commented 9 months ago

Proposal

Setting a delay or fault via admin API POST /mappings will not work. This works with http requests

Reproduction steps

Run wiremock with wiremock-grpc-extension-standalone-0.4.0 and post the request like:

POST /mappings

Host: [0.0.0.0:8080] User-Agent: [Go-http-client/1.1] Content-Length: [334] Content-Type: [application/json] Accept-Encoding: [gzip] {"uuid":"18078c51-6cc5-4530-92ba-e74fe23b7f59","id":"18078c51-6cc5-4530-92ba-e74fe23b7f59","request":{"method":"POST","urlPath":"/com.example.grpc.GreetingService/greeting"},"response":{"delayDistribution":{"milliseconds":10000,"type":"fixed"},"fault":"CONNECTION_RESET_BY_PEER","headers":{"grpc-status-name":"OK"},"jsonBody":{"greeting":"Hello World!!"},"status":200}}

Make a grpc request and an http request gRPC to service com.example.grpc.GreetingService and method greeting and HTTP POST http://0.0.0.0:8080/com.example.grpc.GreetingService/greeting

References

No response