Commit Graph

823 Commits

Author SHA1 Message Date
onikytchuk
12e6170283 [#584] Added inclusion configuration 'includeFiles' that allow producers to filter common repository structure and define the list of messaging topics that would be processed during the tests autogeneration. 2018-05-10 09:23:13 +03:00
Tim Ysewyn
13873f3481 A response header should be verified against an execution property (#649)
Fixes #628
2018-05-09 07:57:30 +02:00
Axel Hodler
87d6d9e4f1 Dont parse body if not specified in contract (#624) 2018-05-01 09:32:12 -04:00
buildmaster
7484fc339c Going back to snapshots 2018-04-23 15:16:20 +00:00
buildmaster
7a6037cafe Update SNAPSHOT to 2.0.0.RC1 2018-04-23 15:09:43 +00:00
Tim Ysewyn
5dbac1f210 Generated messaging tests could create compilation errors for certain regexes in headers (#622)
* Fixed an issue with the generation of messaging tests where the regex pattern was creating compilation errors

fixes gh-620

(cherry picked from commit f64feaf)
2018-04-19 08:54:27 +02:00
Tim Ysewyn
f64feaf84d Generated messaging tests could create compilation errors for certain regexes in headers (#622)
* Fixed an issue with the generation of messaging tests where the regex pattern was creating compilation errors

fixes gh-620
2018-04-18 23:17:59 +02:00
Marcin Grzejszczak
4010144136 Merge branch '1.2.x' 2018-04-12 16:32:15 +02:00
Marcin Grzejszczak
d467341427 Ensured that stub part of the body gets returned form WIreMock response, fixes gh-611 2018-04-12 15:49:18 +02:00
Marcin Grzejszczak
b965c49a7e Added support for multipart with content type, fixes gh-599 2018-04-11 15:37:13 +02:00
Marcin Grzejszczak
34f367e62b Merge branch '1.2.x' 2018-04-11 12:48:22 +02:00
Marcin Grzejszczak
6ace68284c Added docs 2018-04-11 12:34:23 +02:00
Marcin Grzejszczak
d203fe8dea Added tests, dsl -> yml cookies 2018-04-11 12:04:34 +02:00
Alex Xandra Albert Sim
2068fdc8ca Added more tests to have better coverage 2018-04-11 14:47:17 +07:00
Alex Xandra Albert Sim
a181c6576f YAML cookie support 2018-04-11 14:47:00 +07:00
Marcin Grzejszczak
a0641790a9 Wiremock stubs with cookies + some tests 2018-04-11 10:05:43 +07:00
Alex Xandra Albert Sim
bca6c14350 Added compilation test to cookie assertion tests 2018-04-10 08:27:56 +07:00
Alex Xandra Albert Sim
c740f8b3dd Add cookie header check to contract verifier 2018-04-09 15:45:08 +07:00
Marcin Grzejszczak
9abc2b39e1 Migrating to byte arrays; fixes #605 2018-04-04 16:03:43 +02:00
Marcin Grzejszczak
482f000f72 Added a guard to point to a missing type in YAML 2018-04-03 21:25:06 +02:00
Marcin Grzejszczak
bf19d06329 Fixed the tests 2018-04-03 21:10:57 +02:00
Marcin Grzejszczak
2980145c1b Merge branch '1.2.x' 2018-04-03 20:58:18 +02:00
Marcin Grzejszczak
7652bcff48 Fixed missing support for predefined matchers for messages; fixes #604 2018-04-03 20:58:10 +02:00
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
buildmaster
766cd59f64 Bumping versions to 1.2.5.BUILD-SNAPSHOT after release 2018-03-27 00:44:45 +00:00
buildmaster
ce62f7f77a Going back to snapshots 2018-03-27 00:44:43 +00:00
buildmaster
71061a7d7f Update SNAPSHOT to 1.2.4.RELEASE 2018-03-27 00:33:17 +00: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