If I am mocking a grpc endpoint it seems like `{{r...
# help
s
If I am mocking a grpc endpoint it seems like
{{request.baseUrl}}
doesn’t return the correct host or port. Is this expected behavior? For example the container port is mapped to a random port(
32811
) on the host with testcontainers but its returning the port(
29194
)that wiremock is set to run on.
Copy code
8080/tcp, 8443/tcp, 0.0.0.0:32811->29194/tcp, :::32811->29194/tcp
a
Hello @Sean Trantalis, this behaviour is expected. Wiremock lives in the application running inside the container, which is unaware of the Docker port mapping. It only knows about its internal configuration and thus reports its internal port(
29194
). A workaround you could set an environment variable and use it:
Copy code
{{systemValue type='ENVIRONMENT' key='MY_BASE_URL'}}