Hey folks, so I'm getting to grips with WireMock, ...
# help
b
Hey folks, so I'm getting to grips with WireMock, I'm using the Java version 3.12.1 in a Kotlin project with the GraphQL extension. The thing I'm having trouble with is the
BackingStore
. I've read that it is specified in the options when we initialise a WireMockServer like this:
Copy code
WireMockConfiguration config = WireMockConfiguration.options()
    .port(8080)
    .backingStore(new FileBasedBackingStore("wiremock_data"));
WireMockServer wireMockServer = new WireMockServer(config);
wireMockServer.start();
Where the
FileBasedBackingStore
is imported from here:
com.github.tomakehurst.wiremock.store.file.FileBasedBackingStore
. However the package structure has changed since then. Is the BackingStore no longer a thing? Best wishes and many thanks in advance.
Ok so further research has pointed to the fact that the Backing Store is only a thing in the standalone version.
l
Are you running WireMock inside a test or something else?
b
I'm running it in a Kotlin application with a Spring boot api that serves as the test back end for a front end E2E test suite.
l
Awesome. Do you have it up and running ok now ?
b
No I need to come back to it because I'm working on something else.
👍 1
t
There’s never been a
.backingStore(…)
on the options builder. Did this come from an AI tool by any chance? 🙂
b
Sadly yes. 🫢
So I've got around this by adding a reset route to my spring boot API that calls
WireMockServer.resetAll()
and then reregisters the mappings.
👍 1