Commit Graph

101 Commits

Author SHA1 Message Date
Marcin Grzejszczak
b7beb322b5 Fixed deserialization of byte array
without this fix we're not assuming that the payload can be an array of bytes
with this fix we're converting an array of bytes into a String

fixes #178
2016-12-27 12:24:34 +01:00
Marcin Grzejszczak
4582a6a3bf Fixed invalid parsing of ids
without this change when someone has provided an empty value of port then a default classifier was set instead of picking the provided one

fixes #176
2016-12-22 19:10:42 +01:00
Marcin Grzejszczak
545874c951 Issues #110 user pass (#157)
can now configure username and password authentication and a proxy for accessing stub repository

Fixes #110
2016-12-05 14:56:08 +01:00
Marcin Grzejszczak
cf2dbc24a6 Adds the env prop for every run server (#158)
without this change you can't reference the port of a server as an env var

fixes #147
2016-12-01 22:49:23 +02:00
Marcin Grzejszczak
7a347da55a Going back to snapshots 2016-11-24 18:58:50 +01:00
Marcin Grzejszczak
c7883a0d97 Bumping version before release 2016-11-24 18:37:39 +01:00
Marcin Grzejszczak
a5642265cd Fixed the way contracts are packaged and tests are generated for plugins
the biggest problem was related with the scenario in which a jar with shared contracts is downloaded
with this change the output JAR structure is proper

fixes #156
2016-11-24 16:56:58 +01:00
Marcin Grzejszczak
b1175ff9bd Simplification of the dsl (#151)
with this change to DSL we're adding some helper methods and DSL simplifications 

- c(...) / p(...) - for consumer / producer
- for regex - e.g. $(anyUrl()) - insead of $(consumer(regex(url()))
- Added helper headers and media types
- Added helper http methods

fixes #149
2016-11-18 15:38:35 +01:00
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
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
Denis Stepanov
ca1cb9fdf6 Allow empty classifier (#134) 2016-11-07 15:11:16 +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
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
Marcin Grzejszczak
ec9482497d Made StubRunnerMain main method public
fixes #107
2016-10-13 17:42:42 +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
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
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
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
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
788b35aedb Stubbing service discovery out completely
without this change if you have a DiscoveryClient bean it's used for delegation. For tests with Stub Runner actually we don't want to delegate. There is an option however to turn on this delegation

fixes #82
2016-09-23 10:41:02 +02:00
Marcin Grzejszczak
01f4ad76be Consumer Contracts (#83)
With this functionality you can have one centralized repository containing all contracts. This repo will have to produce a JAR containing all contracts. The layout of the repository can be arbitrary but some sensible defaults are assumed. The producer will be able to then download that JAR and produce tests and stubs from it.

fixes #38
2016-09-23 10:16:51 +02:00
Marcin Grzejszczak
8bca6f22e6 Removed the CloudFoundry AutoConfig 2016-09-20 16:19:50 +02:00
Marcin Grzejszczak
8bb5ce7297 Added AutoConfiguration available for Cloud profile that stubs out service discovery
will work only if the library is available at runtime (which shouldn't take place apart from testing environments)
2016-09-19 19:42:10 +02:00
Dave Syer
06c9db932e Rationalize dependency management in BOMs 2016-09-19 12:02:25 +01:00
Marcin Grzejszczak
d510e8bdf3 Updated hostname for registered stubs 2016-09-16 16:28:58 +02:00
Marcin Grzejszczak
8c89ec48b7 Added EurekaClientConfigBean 2016-09-16 14:54:34 +02:00
Marcin Grzejszczak
24b3f80e8c Going back to SNAPSHOTs 2016-09-08 23:25:23 +02:00
Marcin Grzejszczak
411ca5886b Bumping versions before RC1 release 2016-09-08 23:25:23 +02:00
Marcin Grzejszczak
30e149694e Moved message collector to a separate config 2016-09-02 17:41:20 +02:00
Marcin Grzejszczak
49c5089b40 Added missing beans + Added auto creation of message channels 2016-09-02 17:06:18 +02:00
Marcin Grzejszczak
bfc2172d66 Applied checkstyle rules 2016-08-29 12:04:21 +02:00
Marcin Grzejszczak
c59306ce5d Going back to snapshots 2016-08-27 00:27:55 +02:00
Marcin Grzejszczak
bf60a6b72f Bumping versions before release 2016-08-26 23:51:33 +02:00
Marcin Grzejszczak
4101014115 Simplified eureka ribbon integration 2016-08-26 23:27:34 +02:00
Marcin Grzejszczak
6a7aebf1ad Bumping to Camden versions of apps
TODO: currently to make things work I had to pass ribbon.eureka.enabled=false, I'll have to think if I can somehow override it. The problem is that I have a lot of stuff on the classpath...
2016-08-26 16:43:40 +02:00
Marcin Grzejszczak
64d6d3ef6c Automatic stub registration (#64)
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
2016-08-26 16:09:16 +02:00
Marcin Grzejszczak
43082d8ca6 Updated the documentation 2016-08-24 17:57:18 +02:00
Marcin Grzejszczak
5d3e99874f Added options to pass props via @AutoConfigureStubRunner (#61)
* Added options to pass props via @AutoConfigureStubRunner

it's much easier to pass props via the annotation instead of property files. With this change the user can provide the properties inside the test via the annotation. The only thing that has to be passed via props is repositoryRoot (typically it's a very constant property that you set once).

fixes #46
2016-08-24 16:14:10 +02:00
Marcin Grzejszczak
3f799405a4 Fixed wrong ConfigurationProperties setting 2016-08-22 16:30:51 +02:00
Marcin Grzejszczak
48aa8f763d DiscoveryClient is optional
without this change if you want to use Spring Cloud Contract Stub Runner Cloud you need to have an implementation of Service Discovery on your classpath. That's not always what you want to have - actually the tests should be possible to be run without any backing service disvoery technology.

    This change provides the default NoOp Discovery Client in case where there is no bean of DiscoveryClient type.

    fixes #56
2016-08-22 16:29:09 +02:00
Marcin Grzejszczak
c7665db7d9 Fixed code style issues 2016-08-12 11:46:41 +02:00
Marcin Grzejszczak
3552684f93 Invalid array size check
there was a problem with the way property related to array size check was passed. Not only was the condition inverse, but also the properties weren't passed.

With this change those issues were fixed, we've added the missing maven plugin feature and ensured that the array check is the default option.

fixes #60
2016-08-11 14:33:30 +02:00
Dave Syer
88429ceada Use jopt instead of args4j (like Spring Boot does) 2016-07-29 08:57:42 +01:00
Dave Syer
4e21cbd884 Fix name of artifact in dsl test 2016-07-26 17:51:04 +01:00