https://linen.dev logo
#wiremock-java
Title
# wiremock-java
s

Seweryn

12/15/2023, 8:00 PM
Hi. I am running WireMock via Testcontainers and I need to set somehow path to files. I can't find anything to set __files via testcontainers. 😕 My mapping response suppose to return "bodyFileName": "myfile.xml" . How to set it ? Thak you for any help. PS: IDEA logs error looks like .
Copy code
"{<EOL>"servlet":"com.github.tomakehurst.wiremock.servlet.WireMockHandlerDispatchingServlet-fd46303",<EOL>"cause0":"java.io.FileNotFoundException: /home/wiremock/./__files/myfile.xml (No such file or directory)",<EOL>"message":"java.io.FileNotFoundException:
o

Oleg Nenashev

12/15/2023, 9:23 PM
Hello. There is a
withFileFromResource()
method
s

Seweryn

12/15/2023, 11:58 PM
Saw it. How to set path ? Do you know maybe ?
o

Oleg Nenashev

12/16/2023, 7:54 AM
It basically takes test JAR resources which you can put in src/test/resources in the majority of Java test frameworks
1
3 Views