pact-provider-verifier 1.3.0 → 1.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +9 -1
- data/README.md +6 -0
- data/lib/pact/provider_verifier/app.rb +1 -1
- data/lib/pact/provider_verifier/set_up_provider_state.rb +17 -1
- data/lib/pact/provider_verifier/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 33b7a1e5844f5e9cc469f8fb86e3c3cffd6666a8
|
4
|
+
data.tar.gz: c717b51a619226af098202ca5fd3ced93557800b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 137627401c24bc920031b61e53c34cb8a5ffb58acc477b9600401599303dd51082c924b5312239e4f3b3aedd30d1f97031c9757378c7467101d0a4f883970ac8
|
7
|
+
data.tar.gz: a3aca7c4aa96211d052306a3fe1b6c0c51162b207720b805276bd65992cf6124042d316ce1e6c8718ad5d35fb2cab3ec31315f0bccd4f4437441153b923483cd
|
data/CHANGELOG.md
CHANGED
@@ -1,4 +1,12 @@
|
|
1
|
-
<a name="
|
1
|
+
<a name="v1.3.1"></a>
|
2
|
+
### v1.3.1 (2017-08-08)
|
3
|
+
|
4
|
+
#### Bug Fixes
|
5
|
+
|
6
|
+
* **windows**
|
7
|
+
* Add retries for flakiness demonstrated on windows builds for pact-go ([198efef](/../../commit/198efef))
|
8
|
+
|
9
|
+
<a name="v1.3.0-1"></a>
|
2
10
|
# v1.3.0 (2017-08-08)
|
3
11
|
|
4
12
|
#### Features
|
data/README.md
CHANGED
@@ -49,6 +49,12 @@ bundle install
|
|
49
49
|
* `--provider_base_url` - the base url of the pact provider (i.e. your API)
|
50
50
|
1.
|
51
51
|
|
52
|
+
### Setting a custom Authentication header
|
53
|
+
|
54
|
+
If you need to set a valid Authentication header for your replayed requests and provider state setup calls, specify `--custom-provider-header "Authentication: Type VALUE"` in the command line options.
|
55
|
+
|
56
|
+
Modification of the request headers is sometimes necessary, but be aware that any modification of the request before it is replayed lessens your confidence that the consumer and provider will work correctly in real life, so do it with caution.
|
57
|
+
|
52
58
|
### API with Provider States
|
53
59
|
|
54
60
|
Execute pact provider verification against a provider which implements the following:
|
@@ -89,7 +89,7 @@ module Pact
|
|
89
89
|
|
90
90
|
def print_deprecation_note
|
91
91
|
if @options.provider_states_url
|
92
|
-
$stderr.puts "The --provider-states-url option is deprecated and the URL endpoint can be removed from the application"
|
92
|
+
$stderr.puts "WARN: The --provider-states-url option is deprecated and the URL endpoint can be removed from the application"
|
93
93
|
end
|
94
94
|
end
|
95
95
|
end
|
@@ -33,7 +33,23 @@ module Pact
|
|
33
33
|
attr_reader :provider_state, :consumer
|
34
34
|
|
35
35
|
def post_to_provider_state
|
36
|
-
|
36
|
+
verbose = verbose?
|
37
|
+
connection = Faraday.new(:url => provider_states_setup_url) do | faraday |
|
38
|
+
# Have encountered flakiness on windows build for pact-go
|
39
|
+
# Using retries as a hacky solution to try and get around this
|
40
|
+
# until/if we can work out what the underlying cause is.
|
41
|
+
# https://github.com/pact-foundation/pact-go/issues/42
|
42
|
+
# eg. https://ci.appveyor.com/project/mefellows/pact-go/build/25#L1202
|
43
|
+
|
44
|
+
faraday.request :retry, max: 2, interval: 0.05,
|
45
|
+
interval_randomness: 0.5, backoff_factor: 2,
|
46
|
+
methods:[:post],
|
47
|
+
exceptions: [Faraday::ConnectionFailed]
|
48
|
+
|
49
|
+
faraday.response :logger if verbose
|
50
|
+
faraday.adapter Faraday.default_adapter
|
51
|
+
end
|
52
|
+
|
37
53
|
connection.post do |req|
|
38
54
|
req.headers["Content-Type"] = "application/json"
|
39
55
|
add_custom_provider_header req
|