Slackbot
11/21/2023, 3:30 PMLee Turner
11/21/2023, 3:49 PMIngmar van Dijk
11/22/2023, 1:21 PMLee Turner
11/22/2023, 1:23 PMTom
11/22/2023, 4:13 PMIngmar van Dijk
11/23/2023, 7:31 AMWhen the gRPC stream source emits a HelloResponse with greeting 'Hello Tom'
...
When the gRPC stream source emits a HelloResponse with greeting 'Hello Lee'
Ingmar van Dijk
11/23/2023, 7:32 AMTom
11/23/2023, 9:32 AMIngmar van Dijk
11/23/2023, 10:27 PMPOST [<http://wiremock:8000/__admin/mappings>] - {'request': {'method': 'POST', 'urlPath': '/com.example.grpc.GreetingService/oneGreetingManyReplies'}, 'response': {'jsonBody': {"greeting": "Hello from Mapping"}, 'status': 200}}
This response with the stub-mapping including the id, for example id1
Now my system under test connects to the mapped gRPC stream and receives the “Hello from Mapping” greeting.
Up to this point, this is already working.
Assuming the stream is still open, my test-case should be able to trigger another event.
What I could imagine:
When the GreetingService reply stream emits a HelloResponse with greeting “Hello from Triggered”
POST [<http://wiremock:8000/__admin/mappings/id1/emit>] - {'response': {'jsonBody': {"greeting": "Hello from Trigged"}, 'status': 200}}
I’m not sure whether the Wiremock Mappings are linked to the gRPC streams, but if that is the case, I would expect that anybody that connected to a specific mapping should receive the event.Ingmar van Dijk
11/23/2023, 10:37 PMTom
11/24/2023, 11:53 AMIngmar van Dijk
11/24/2023, 1:07 PM