Commit Graph

447 Commits

Author SHA1 Message Date
Marcin Grzejszczak
6402e14f3c Added support for Stub Runner and Pact Broker
fixes gh-191
commit 533f1d3d0e8f6dcd37677bfef555fc2ea86bc1b1
Author: Tim Ysewyn <Tim.Ysewyn@me.com>
Date:   Wed Mar 7 15:56:48 2018 +0100

    Upgraded pact-jvm-model to 3.5.13
2018-04-02 22:50:40 +02:00
Tim Ysewyn
de529e222e Support for Pact v3 (#569)
* Upgraded pact-jvm-model to 3.5.13
* Enhanced the conversion of Spring Cloud contracts to Pact contracts using the v3 spec.
Introduces breaking change returning a list of `Pact`s instead of one.
* Enhanced the conversion of Pact contracts using the v3 spec tp Spring Cloud contracts.
* Implemented conversion of Pact v3 messaging to/from Spring Cloud contracts
* Updated code based on comments in the PR
* Added null matcher
* Added missing null matcher conversion from SCC to Pact
* Added number, integer and decimal matchers
* Added support for multiple matchers for the same json path.
Currently only the AND rule logic is supported.
* Added value generator functionality
* Refactored `stubMatchers` and `testMatchers` to support multiple types of "matcher groups", eg. header, path & query
* Refactored e37a8c5d82f96da6e1a698331afc62e6cf747bd6 in favor of a less invasive change using deprecation
* Added header matcher conversion
* Add/updated the ASF license header
* Fixed an issue with the header matchers while updating the documentation
* Updated the documentation
* Made some last minute changes to the `bodyMatchers`: `byNull()` isn't supported by WireMock

Closes #583
Fixes #595
2018-04-02 22:06:51 +02:00
Marcin Grzejszczak
0fe31ce3a5 Git Stub Downloader (#596)
when stubsMode is set to LOCAL or REMOTE, and repositoryRoot starts with git:// we can clone the provided git repository, and search for the folder with stubs for the given artifact. So if the git repo has a folder structure of groupid/artifactid/version (where group id is either dot or slash separated), then we will provide a path to that repository for the stub runner to harvest the stubs

- externalized versions
- added more debugging messages
- added ContractProjectUpdater that updates the project containing contracts from SCM. ATM supports only git
- added ResourceResolver that retrieves the ProtocolResolvers. It does it via spring.factories entries containing StubDownloaderBuilder. SDP extends ProtocolResovler.
added StubRunner.properties map, that will contain any properties that will be later used by any StubDownloader implementations
- added PUBLISH_STUBS_TO_SCM env var for Docker, so that publishStubsToScm task gets called
- updated docs

Breaking:

- StubDownloaderBuilder extends ProtocolResovler. By default the ProtocolResolver methods return null.
- stubRunnerOptions.stubRepositoryRoot is a Resource not a String
- generateWireMockClientStubs Gradle task got removed
- if folder with contracts has a subfolder called contracts, we will pick contracts from the subfolder

fixes #580
2018-03-31 09:35:00 +02:00
Axel Hodler
663e1929d8 Extend matchers (#598)
* Added anyHttpsUrl DslProperty

* Added anyPositiveInt DslProperty
2018-03-25 13:03:59 +02:00
buildmaster
b9740e900d Going back to snapshots 2018-03-22 23:54:47 +00:00
buildmaster
501fefd389 Update SNAPSHOT to 2.0.0.M8 2018-03-22 23:52:03 +00:00
Devon D'Apuzzo
1f51191327 Make headers matches in generated jUnit code escape regex '\'s. (#592)
+ Update tests to reflect desired behavior.
2018-03-21 20:49:14 +01:00
Marcin Grzejszczak
a4e79d380f Fixed accidentally pasted code 2018-03-21 15:17:54 +01:00
Marcin Grzejszczak
736f56a93b Added tests for optional fields with nulls 2018-03-21 15:00:39 +01:00
Marcin Grzejszczak
297ee8e2ea Changed the Groovy equals & hashcode usage to manual one
there's a bug in Groovy with autogenerated hashCode and byte arrays
to fix it we've migrated from the AST to manual hashcode and equals generation

fixes gh-546
2018-03-21 14:03:06 +01:00
Marcin Grzejszczak
0078230492 Merge branch '1.2.x' 2018-03-21 11:35:42 +01:00
Marcin Grzejszczak
4e08f77996 escapes all generated strings by Xeger so that the code is java compatible
related to gh-589

fixes gh-588
2018-03-21 11:35:29 +01:00
Marcin Grzejszczak
f70c1dbfdd Added support for patterns inside GStrings in URL
related to gh-589

fixes gh-588
2018-03-21 10:54:24 +01:00
Marcin Grzejszczak
561c2d30ec Merge branch '1.2.x' 2018-03-21 09:14:07 +01:00
Marcin Grzejszczak
f57cefc68a Ensured that regular expressions are generated properly; fixes gh-587 2018-03-21 09:13:19 +01:00
Marcin Grzejszczak
18d0827fa7 Merge branch '1.2.x' 2018-03-20 21:14:22 +01:00
Marcin Grzejszczak
67019774e1 Fixed missing conversion of messaging patterns to java
without this change patterns were not escaped the way they should

fixes gh-587
2018-03-20 21:08:24 +01:00
Marcin Grzejszczak
b70106e7bc Merge branch '1.2.x' 2018-03-20 14:17:20 +01:00
Marcin Grzejszczak
c7250a8d62 Added support for RoutingKey in AMQP stub messages
fixed via @KazuoD suggestion

fixes gh-585
2018-03-20 14:17:05 +01:00
Marcin Grzejszczak
e4eaafc697 Added Support Content-Transfer-Encoding in Multipart regexp
fixes gh-339
2018-03-19 15:31:42 +01:00
Marcin Grzejszczak
65cd71f38e Added support for byte multipart content
fixes gh-546
2018-03-19 10:54:02 +01:00
Marcin Grzejszczak
cd723739b5 Added more verbose information to collection assertions
with this change each collection assertion has the `.as("x.y.z")` where `x.y.z is the json path. That results in the following message to be printed when size of the collection was wrong

`[x.y.z] The size <3> is not between <5> and <7>`

fixes gh-441
2018-03-16 17:48:01 +01:00
Marcin Grzejszczak
e222142321 Added support for form param
without this change we supported only text and json content type body.
with this change we also support url encoded form parameters

fixes gh-578
2018-03-16 12:05:53 +01:00
Marcin Grzejszczak
8e4360535c Added HttpStatus delegate in the Groovy DSL Response
with this change there are numerous helper methods that should provide a more descriptive DSL for the response status. Instead of a numerical status you can now call a method e.g. instead of 200 call OK()

fixes gh-575
2018-03-15 10:00:45 +01:00
Axel Hodler
f31e9ba137 Added anyDouble DslProperty (#571) 2018-03-14 21:07:20 +01:00
Marcin Grzejszczak
26cc450108 Added beanutils version 2018-03-09 17:25:32 +01:00
Marcin Grzejszczak
59b1ab439b Merge branch '1.2.x' 2018-03-09 17:23:39 +01:00
Marcin Grzejszczak
9c4758b069 Removed empty if statement 2018-03-09 17:23:29 +01:00
Marcin Grzejszczak
de2d3738eb Merge branch '1.2.x' 2018-03-09 16:57:23 +01:00
Marcin Grzejszczak
2fc413755b Fixed unnecessary quoting of non string value when referencing request from response
fixes gh-559
2018-03-09 16:56:47 +01:00
Mendel Feygelson
2ef24470c5 Do not unescapeJavascript when output header patterns (#568)
* This causes all backslashes to be stripped from the regular
   expression
2018-03-06 15:01:30 -05:00
buildmaster
9c2d54453e Going back to snapshots 2018-02-27 01:35:53 +00:00
buildmaster
c0f773ecd3 Update SNAPSHOT to 2.0.0.M7 2018-02-27 01:30:18 +00:00
Marcin Grzejszczak
96825e2d1c Merge branch '1.2.x' 2018-02-19 10:52:40 +01:00
Marcin Grzejszczak
f05aa45704 Fixed a test; fixes gh-542 2018-02-19 10:52:00 +01:00
Axel Hodler
82fb1cdac3 Avoid quoting of floating point numbers 2018-02-19 10:15:51 +01:00
Marcin Grzejszczak
f44c73fc6d Merge branch '1.2.x' 2018-02-12 17:09:31 +01:00
Marcin Grzejszczak
5de9959561 Bumped to WireMock 2.15.0; fixes gh-548 2018-02-12 17:09:21 +01:00
Marcin Grzejszczak
ca7827dce4 Merge branch '1.2.x' 2018-02-10 08:42:58 +01:00
Marcin Grzejszczak
0fe931b3e8 Allows execute property in multipart; fixes gh-541 2018-02-09 17:10:58 +01:00
buildmaster
a8e3b64fe6 Bumping versions to 1.2.4.BUILD-SNAPSHOT after release 2018-02-09 16:08:54 +00:00
buildmaster
ab660f8944 Going back to snapshots 2018-02-09 16:08:53 +00:00
buildmaster
c510a555b7 Update SNAPSHOT to 1.2.3.RELEASE 2018-02-09 15:54:44 +00:00
Marcin Grzejszczak
7361cf7434 Merge branch '1.2.x' 2018-02-05 14:49:52 +01:00
Marcin Grzejszczak
83e304008e Bumped jsonassert to 0.4.11
fixes gh-538, gh-537
2018-02-05 14:48:04 +01:00
Marcin Grzejszczak
65ee88aa23 Merge branch '1.2.x' 2018-01-19 01:18:33 +01:00
Marcin Grzejszczak
b745d9a7e3 YAML contracts (#522)
with this change we allow the users to use YAML to define contracts

fixes gh-300 gh-508
helps with #501
2018-01-19 00:27:15 +01:00
buildmaster
b2428c5f13 Bumping versions to 1.2.3.BUILD-SNAPSHOT after release 2018-01-16 17:20:16 +00:00
buildmaster
f5561d3f9b Going back to snapshots 2018-01-16 17:20:15 +00:00
buildmaster
19deb01269 Update SNAPSHOT to 1.2.2.RELEASE 2018-01-16 17:09:51 +00:00