Hi, Is there a way to disable WireMock’s Admin API...
# help
u
Hi, Is there a way to disable WireMock’s Admin API requests completely?
Copy code
@SpringBootTest(
    properties = ["client.test.base-url=\${wiremock.server.baseUrl}"],
)
@EnableWireMock
class TestClientTest(
    private val testClient: TestClient,
)
The Feign client URL was set successfully, but a
'Connection refused' error occurred when trying to connect to <http://localhost:8080>.
l
I don't think there is a way to disable them entirely. You can set security on them which might work for your use case. You would need to use the
--admin-api-basic-auth
startup option https://wiremock.org/docs/standalone/java-jar/#command-line-options
u
When I run the tests in IntelliJ, everything works fine, but when I run them with
./gradlew test
, something keeps trying to send a request to
127.0.0.1:8080
, and I can't figure out why. Intellij works fine..
Copy code
01:26:14.336 [qtp301039184-132] INFO  WireMock - Request received:
127.0.0.1 - PUT /request/path

Content-Type: [application/json]
Accept: [*/*]
Accept-Encoding: [gzip, x-gzip, deflate]
Host: [localhost:10978]
Content-Length: [90]
Connection: [keep-alive]
User-Agent: [Apache-HttpClient/5.5 (Java/21.0.1)]
hmm.. https://github.com/spring-cloud/spring-cloud-contract/issues/2095#issue-2111712147 is related