Commit Graph

1204 Commits

Author SHA1 Message Date
Dave Syer
891452376b Don't use ServerProperties for configuring Wiremock server
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.
2016-11-09 16:12:23 +00:00
Marcin Grzejszczak
235af1df1e Added the work offline switch for Gradle plugin
without this change you have to pass `contractRepositoryUrl` for the contract jar to be downloaded
with this change you can pass the `contractsWorkOffline` flag and the local maven repo will be analyzed

fixes #140
2016-11-08 17:27:43 +01:00
Marcin Grzejszczak
293fa22bf4 Updated contract deps 2016-11-08 17:09:07 +01:00
Marcin Grzejszczak
92cf2cf5c6 Updated Spring Boot starter 2016-11-08 17:03:43 +01:00
Marcin Grzejszczak
24e5155431 Added NPE guard for remoteRepos
without this NPE could be thrown while passing workoffline flag and no remote repos
with this NPE will not be thrown

fixes #138
2016-11-08 16:54:40 +01:00
Marcin Grzejszczak
b3cf4077e2 Fixed the base class name
without this change for convention class names we haven't escaped illegal chars
with this change the illegal chars are escaped and no compilation issues occur

fixes #137
2016-11-08 16:14:20 +01:00
Denis Stepanov
ca1cb9fdf6 Allow empty classifier (#134) 2016-11-07 15:11:16 +01:00
Marcin Grzejszczak
137100c1f7 Updated docs 2016-11-07 14:36:26 +01:00
Marcin Grzejszczak
ba45eb582b Updated docs 2016-11-07 14:35:46 +01:00
Mathias Düsterhöft
6f3c3f850b Enable amqp integration by property (#131)
Fixes #133
2016-11-06 22:34:05 +01:00
Dave Syer
f0549af121 Move spring-cloud-commons to parent 2016-11-03 18:01:58 +00:00
Marcin Grzejszczak
a34e1973f8 Update introduction.adoc 2016-11-01 14:25:29 +01:00
Marcin Grzejszczak
8a9098c8b7 Updated docs with webinar info 2016-11-01 07:42:25 +01:00
Mathias Düsterhöft
49520d4c3d Add support for spring-amqp annotated listener endpoints
without this change only explicit Spring AMQP support was present
with this change support for spring-amqp annotated listener endpoints was added

fixes #127
2016-10-31 14:23:56 +01:00
Andrew Morgan
8e7d06bee7 Fixes #124 - When specifying 'workOffline=false', the stubrunner will now always fail if unable to find the stub remotely 2016-10-28 16:53:40 +02:00
Andrew Morgan
413a3d23bb The spring context now fails to start if the stub cannot be found
The spring context now fails to start if the stub cannot be found, enabling the test to fail as quickly as possible for feedback
2016-10-26 11:01:13 +02:00
Marcin Grzejszczak
b690110fcb Throw explicit exceptions for stub runner boot (#119)
without this whenever sth went wrong we got a 404 and message in logs in debug
with this change we explicitly say what went wrong and return the list of possible labels

fixes #118
2016-10-21 13:05:26 +02:00
Marcin Grzejszczak
106239351b Fixed wrong pom 2016-10-20 14:50:40 +02:00
Marcin Grzejszczak
0328a26d69 Fixed wrong version 2016-10-20 13:04:40 +02:00
Mathias Düsterhöft
2b70b450b9 add spring-amqp/spring-rabbit support for message contracts (#106) 2016-10-20 12:43:31 +02:00
Andrew Fitzgerald
74ea3fd27d Allow MethodBodyBuilder to evaluate ExecutionProperty objects (#114) 2016-10-18 08:20:17 +02:00
Andrew Fitzgerald
8d8cdfe89b Add UUID regex compatible with java.util.UUID. (#115) 2016-10-18 08:17:44 +02:00
Marcin Grzejszczak
f4a6b4f4b1 Going back to snapshots 2016-10-17 12:22:17 +02:00
Marcin Grzejszczak
dd214f83f6 Bumping versions before release 2016-10-17 11:54:52 +02:00
Marcin Grzejszczak
7072284c95 Making Windows build pass (#109)
* had to ignore some tests for Windows due to absurd exceptions
* fixed escaping path for directory matching

fixes #98
2016-10-16 13:47:46 +02:00
dantwining
4779729ed9 Minor typo in README (#108) 2016-10-13 22:27:13 +02:00
Marcin Grzejszczak
ec9482497d Made StubRunnerMain main method public
fixes #107
2016-10-13 17:42:42 +02:00
Dave Syer
13a90f71e9 Defer setting ignore expect order 2016-10-12 09:20:22 +01:00
Marcin Grzejszczak
c8ac0fe8dc Fixing checkstyle issues 2016-10-12 10:18:19 +02:00
Dave Syer
0f41f4a4dc Tweak mock server builder so that it ignores order by default
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).
2016-10-11 17:03:14 +02:00
Marcin Grzejszczak
0fc5642ddb Added option to provide full string notation to find stub
without this change you could use only `artifactid` or `groupid:artifactid`
without this change when a stub is not found a null was returned

with this change you can use `groupid:artifactid:version` or `groupid:artifactid:version:classifier`
with this change when a stub is not found an exception is thrown

fixes #102
2016-10-11 16:08:43 +02:00
Dave Syer
1a88cbd40a Fix order of matchers in mock 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).
2016-10-11 15:45:30 +02:00
Dave Syer
67e75fd2c6 Add header matchers for mock http server
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.
2016-10-11 14:58:14 +02:00
Dave Syer
103668c669 Add all headers if they are matched with "equalTo"
Still TODO: other matcher types (regex etc.)

See gh-105
2016-10-11 14:31:40 +02:00
Dave Syer
870e42f565 Fix mock server when path is empty
When the path is empty "/" is a better default than "null".
2016-10-11 13:57:36 +02:00
Marcin Grzejszczak
b17238ff4e Fixing missing context-path usage
without this change when the user adds context-path it gets ignored and WireMock fails to register stubs
with this change we update the WireMock instance to include the context path

fixes #99
2016-10-11 11:27:24 +02:00
Dave Syer
4313717e01 Check that header exists explicitly while loading stubs
Fixes gh-103
2016-10-11 09:49:30 +01:00
Dave Syer
1d32db483b Add test and correct double "/" in fail path
A double "/" wrks with the file system but not in a jar file
apparently, so the test isn't perfect yet. Also improves
javadocs for stubs().
2016-10-11 09:38:37 +01:00
Marcin Grzejszczak
6f116a0b6a Fixing the conditional on class
without this change if one doesn't have spring integration java dsl on classpath and uses Stream the app will break on boot
with this change the wrong class on the conditional on class gets fixed

fixes #100
2016-10-10 17:29:03 +02:00
Marcin Grzejszczak
37bc32ea76 Fixing the tests for Windows 2016-10-10 15:56:49 +02:00
Marcin Grzejszczak
f56eba4136 Fixing the tests for Windows 2016-10-10 14:52:14 +02:00
Marcin Grzejszczak
118dd8e04f Fixing the tests for Windows 2016-10-10 14:09:02 +02:00
Marcin Grzejszczak
fa152252b9 Fixing the tests for Windows 2016-10-10 13:47:05 +02:00
Marcin Grzejszczak
d3896f913b Changed ContractVerifierObjectMapper to a bean
without this change we couldn't alter the mapper

with this change you can customize the whole verifier objectmapper or the objectmapper that is on classpath

fixes #97
2016-10-07 14:59:49 +02:00
Marcin Grzejszczak
1e3c67e163 Added missing deps for runner
fixes #88
2016-10-04 16:27:15 +02:00
Marcin Grzejszczak
8e68dcedd4 Problem with auto-generated values from regex inside the respose body
added missing `$()` method for consumer and producer side only

fixes #94
2016-10-04 15:12:55 +02:00
Mariusz Smykuła
09cf63a600 stubs mappings directory should be the same for convert and run mojo (#95) 2016-09-30 07:55:35 +02:00
Mariusz Smykuła
61ca5a489c Fix for #87: 3.2.5 is minimum version of Maven required to use the plugin (#91) 2016-09-28 21:17:43 +02:00
Mariusz Smykuła
e5c3d57bdf stubs mappings directory should be the same for convert and run mojo. (#89) 2016-09-27 22:19:14 +02:00
Marcin Grzejszczak
e8031c0a65 Small updates of docs 2016-09-26 14:34:36 +02:00