Akhilesh Chaikam
07/25/2023, 7:02 AM--global-response-templating
to wiremock using env variable in pom.xml. But still I'm not able to get it working, my wiremock doesnt replace the {{request.host}}
in mocked response with localhost
value. I'm not sure what I'm missing. Wiremock image is running at 8080
port inside the docker container which is mapped to 8181
in my machine. It is able to receive the request but this option --global-response-templating
isnt working. Can someone please help me if I'm setting this incorrectly ? Have tried everything but no luck.
<env>
<WIREMOCK_COMMANDLINE_OPTIONS>
--port 8080
--global-response-templating
--max-request-journal-entries 1000
</WIREMOCK_COMMANDLINE_OPTIONS>
</env>
<ports>
<port>+wiremock.host.address:wiremock.host.port:8080</port>
</ports>
And here is how, I'm starting the docker containers.
mvn -X docker:build docker:start -pl container-tests -DSOURCE_DIRECTORY=`pwd` -DskipTests -Ddocker.follow \
-Dsqs.host.port=9324 \
-Dwiremock.host.port=8181 \
-Dims.port=8080 \
-Dpostgresmock.host.port=5432
Oleg Nenashev
07/25/2023, 11:17 AMAkhilesh Chaikam
07/25/2023, 5:15 PM2.35.0
I will go through the given links. Thanks.8080
inside docker. And I see that my command arguments are present in wiremock tab in docker app. (Please see attached image). But still none of those arguments are honored. For eg: --verbose
doesnt enable verbose logging. It still says verbose as false
in output.WIREMOCK_COMMANDLINE_OPTIONS
to cmd
and it worked 🙂. Thanks.
<cmd>--port 8181 --verbose --global-response-templating</cmd>
Oleg Nenashev
07/25/2023, 6:45 PM