Commit Graph

3290 Commits

Author SHA1 Message Date
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
Marcin Grzejszczak
b598518281 Added ignored to contracts
without this change the only way to ignore a contract was to provide it in the plugin's config

with this change you can also set it on the contract itself.

fixes #30
2016-09-26 14:32:01 +02:00
Marcin Grzejszczak
a557b89a86 Fixed missing test side value resolution
without this change when generating contract tests we were not iterating over a parsed json with test side values only. We had DslProperties that were ignored by multiple dispatch

with this change when generating tests we first convert the parsed json into its test side (those with `producer` method) and only then perform any logic

fixes #85
2016-09-26 13:21:06 +02:00
Marcin Grzejszczak
0694d5b6f6 Updated docs 2016-09-23 22:44:01 +02:00
Marcin Grzejszczak
6381362ad6 Going back to Snapshots 2016-09-23 21:04:10 +02:00
Marcin Grzejszczak
8ee2ef4b18 Bumping versions before release 2016-09-23 20:07:58 +02:00
Marcin Grzejszczak
c37873f2b8 Added option to sign archives for Gradle 2016-09-23 19:44:00 +02:00
Marcin Grzejszczak
3f6a1601ab Updated docs 2016-09-23 16:02:27 +02:00
Marcin Grzejszczak
a3e67a1b34 Updated docs 2016-09-23 15:59:55 +02:00
Marcin Grzejszczak
186ac4762f Updated docs 2016-09-23 15:56:11 +02:00
Marcin Grzejszczak
e8917940ec Added option of multiple test base classes
without this change the user was forced to use a single base class for all of the generated tests. It could become problematic after some time.

With this change we provide a range of options of providing different base classes for different contracts.

fixes #16
2016-09-23 15:52:14 +02:00
Marcin Grzejszczak
82a3da2b37 Updated docs 2016-09-23 11:14:02 +02:00
Marcin Grzejszczak
e3d9ec2d28 Updated pom 2016-09-23 11:12:37 +02:00
Marcin Grzejszczak
f079b8e440 Updated docs 2016-09-23 10:56:52 +02:00
Marcin Grzejszczak
71cfdfe9cc Updated docs 2016-09-23 10:44:50 +02:00