without this change the only criterion for matching of requests was URL / headers / content. The method check was missing
with this change we verify if the HTTP method matches too
fixes#163
The problem is that it is a Spring Boot app (really tiny one), so
it binds to server.* in the environment, if you try to use
the stock ServerProperties. We only need a subset of the features
so it's actually relatively easy to wrap it and use a delegate.
If user loads stubs from a directory, the order of the resources
is best left to the comparator by default. If the user wants to
order stubs explicitly, she now has to use ignoreExpectOrder(false)
(the default is true, unlike the normal mock mvc server).
It turns out the WireMock does not (I think) contain a comparator
that helps. We have made a custom comparator that helps a bit
(it orders requests with the same URL in reverse order of the
number of headers matched).
Wrapping the WireMock matcher in a Hamcrest matcher, and also
using WireMock's native support for sorting mappings, so the
most specific match comes first.
before this change the support for Stub Runner Boot with Service Discovery was pretty useless since Stub Runner stubbed service discovery. That makes a lot of sense in unit / integration tests but not when you want to do some version of end to end tests.
With this change you can pass a property to enable automated registration of stubs in Service Discovery.
Technical changes:
* Added Zookeeper registration
* Added Eureka registration
* Added Consul registration
* Added checkstyle plugin - fixed part of exceptions
User can depend on spring-cloud-contract-wiremock and
spring-cloud-starter-web (or tomcat) to get tomcat to run
the wiremock server. The idea is that wiremock runs in the
"ambient" server from Sprign Boot. So far we only support
Tomcat (should be easy to extend).
See tests in spring-cloud-contract-wiremock for details.