This message was deleted.
# help
s
This message was deleted.
m
My debugger breakpoint in transform() is never hit. This is my configuration.
I'm auto-configuring WireMock in my test with this annotation:
Copy code
@AutoConfigureWireMock(port = 0, stubs = "classpath:/stubs")
t
@RegisterExtension
is for JUnit extensions rather than WireMock's. You need to add your transformer via the
.extensio s(...)
method on the config object passed to WireMock at startup.
m
I see. Do you know if there are any spring-level hooks for that? I ask because we use an annotation to auto-configure wiremock, so we don't have access to that object directly
t
I think you can put an instance of
WireMockConfiguration
into the test context and add it to this, per this comment: https://github.com/spring-cloud/spring-cloud-contract/blob/main/spring-cloud-contr[…]ingframework/cloud/contract/wiremock/WireMockConfiguration.java
m
I tried providing a
WireMockConfiguration
as a bean, but I ran into issues that it didn't pick up whatever other spring magic the auto-configuration does. However, what did solve it was adding a
WireMockConfigurationCustomizer
bean:
πŸ‘ 1
Thanks for all the help πŸ˜ƒ
I realize this is a spring-cloud-contract-wiremock issue, rather than a wiremock issue, but still πŸ˜ƒ
t
I probably ought to refresh my understanding of it a bit, since it’s such a big portion of our users
m
Thanks for a great piece of software πŸ˜ƒ
t
Thanks for the kind feedback!