When running a Mule application (not Munit tests), the wiremock module cannot find the stubs. I've tried placing the following into src/{main,test}/resources/mappings/test.json:
{
"request" : {
"method" : "GET",
"urlPath" : "/test"
},
"response" : {
"status" : 200,
"body" : "Hello"
}
}
Here's my xml config:
<wiremock:config name="WireMock_Config" doc:name="WireMock Config" doc:id="ea4347cf-85c6-4a98-b2c1-7457e5c48225" >
<wiremock:connection host="0.0.0.0" port="8080" resources="src/main/resources"/>
</wiremock:config>
<http:listener-config name="HTTP_Listener_config" doc:name="HTTP Listener config" doc:id="d8bd718c-a7d0-4e09-8efd-480b1aea4223" >
<http:listener-connection host="0.0.0.0" port="8081" />
</http:listener-config>
<http:request-config name="HTTP_Request_configuration" doc:name="HTTP Request configuration" doc:id="53c6f7be-ae3e-413c-897b-2dfa95e4ccb2" >
<http:request-connection host="localhost" port="8080" />
</http:request-config>
<flow name="wiremock-testFlow" doc:id="bbfda619-e80b-41c7-82cd-86eac60971b1" >
<http:listener doc:name="Listener" doc:id="0a63a6ef-43e8-455c-a9d9-c0cd3c510575" config-ref="HTTP_Listener_config" path="/test"/>
<logger level="INFO" doc:name="Logger" doc:id="9f6c5548-48da-4ca9-a050-085aacfc1c50" message="Before mock"/>
<http:request method="GET" doc:name="Should get stubbed" doc:id="494451c9-a839-4492-926a-bae0fd09de02" config-ref="HTTP_Request_configuration" path="/test"/>
<logger level="INFO" doc:name="Logger" doc:id="ef831d7c-1964-4a70-913f-d125b411a73d" message="After mock"/>
</flow>
Thank you kindly in advance for a quick resolution on this issue.
When running a Mule application (not Munit tests), the wiremock module cannot find the stubs. I've tried placing the following into
src/{main,test}/resources/mappings/test.json:Here's my xml config:
Thank you kindly in advance for a quick resolution on this issue.