-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: recreating issue for pact-ruby-standalone 10
- Loading branch information
Showing
7 changed files
with
154 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
I, [2018-02-07T13:37:06.144957 #96803] INFO -- : Cleared interactions before example "BarClient can retrieve a thing" | ||
I, [2018-02-07T13:37:06.148124 #96803] INFO -- : Registered expected interaction GET /foo | ||
D, [2018-02-07T13:37:06.148259 #96803] DEBUG -- : { | ||
"description": "a retrieve thing request", | ||
"request": { | ||
"method": "get", | ||
"path": "/foo", | ||
"headers": { | ||
"Accept": "application/json" | ||
} | ||
}, | ||
"response": { | ||
"status": 200, | ||
"headers": { | ||
"Content-Type": "application/json" | ||
}, | ||
"body": { | ||
"results": { | ||
"json_class": "Pact::ArrayLike", | ||
"contents": { | ||
"name": { | ||
"json_class": "Pact::Term", | ||
"data": { | ||
"generate": "Games", | ||
"matcher": {"json_class":"Regexp","o":0,"s":"Games|Book Clubs"} | ||
} | ||
} | ||
}, | ||
"min": 1 | ||
} | ||
} | ||
} | ||
} | ||
I, [2018-02-07T13:37:06.173082 #96803] INFO -- : Received request GET /foo | ||
D, [2018-02-07T13:37:06.173183 #96803] DEBUG -- : { | ||
"path": "/foo", | ||
"query": "", | ||
"method": "get", | ||
"headers": { | ||
"User-Agent": "Faraday v0.12.2", | ||
"Accept": "application/json", | ||
"Accept-Encoding": "gzip;q=1.0,deflate;q=0.6,identity;q=0.3", | ||
"Connection": "close", | ||
"Host": "localhost:4638", | ||
"Version": "HTTP/1.1" | ||
} | ||
} | ||
I, [2018-02-07T13:37:06.173341 #96803] INFO -- : Found matching response for GET /foo | ||
D, [2018-02-07T13:37:06.173454 #96803] DEBUG -- : { | ||
"status": 200, | ||
"headers": { | ||
"Content-Type": "application/json" | ||
}, | ||
"body": { | ||
"results": { | ||
"json_class": "Pact::ArrayLike", | ||
"contents": { | ||
"name": { | ||
"json_class": "Pact::Term", | ||
"data": { | ||
"generate": "Games", | ||
"matcher": { | ||
"json_class": "Regexp", | ||
"o": 0, | ||
"s": "Games|Book Clubs" | ||
} | ||
} | ||
} | ||
}, | ||
"min": 1 | ||
} | ||
} | ||
} | ||
I, [2018-02-07T13:37:06.177059 #96803] INFO -- : Verifying - interactions matched for example "BarClient can retrieve a thing" | ||
I, [2018-02-07T13:37:06.181861 #96803] INFO -- : Writing pact with details {:consumer=>{:name=>"Foo"}, :provider=>{:name=>"Bar"}, :pactfile_write_mode=>"overwrite", :pact_dir=>"/Users/bethanyskurrie/workspace/pact-foundation/pact-ruby-e2e-example/consumer/spec/pacts"} | ||
I, [2018-02-07T13:37:06.181970 #96803] INFO -- : Writing pact for Bar to /Users/bethanyskurrie/workspace/pact-foundation/pact-ruby-e2e-example/consumer/spec/pacts/foo-bar.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Logfile created on 2018-02-07 13:36:53 +1100 by logger.rb/56815 | ||
I, [2018-02-07T13:36:53.489916 #96786] INFO -- : Starting app Bar #<Pact::MockService::App:0x007fd64634fd40> on port 4638... | ||
I, [2018-02-07T13:36:53.847858 #96786] INFO -- : Started on port 4638 | ||
I, [2018-02-07T13:36:54.021857 #96786] INFO -- : Clearing all expectations | ||
I, [2018-02-07T13:36:54.070265 #96786] INFO -- : Verifying interactions for BarClient can retrieve a thing | ||
D, [2018-02-07T13:36:54.077438 #96786] DEBUG -- : Supposed to be stopping | ||
I, [2018-02-07T13:37:05.992080 #96803] INFO -- : Starting app Bar #<Pact::MockService::App:0x007febb6c85010> on port 4638... | ||
I, [2018-02-07T13:37:06.108727 #96803] INFO -- : Started on port 4638 | ||
I, [2018-02-07T13:37:06.142151 #96803] INFO -- : Clearing all expectations | ||
I, [2018-02-07T13:37:06.174394 #96803] INFO -- : Verifying interactions for BarClient can retrieve a thing | ||
D, [2018-02-07T13:37:06.183443 #96803] DEBUG -- : Supposed to be stopping | ||
I, [2018-02-07T13:37:06.859092 #96807] INFO -- : Running example 'Verifying a pact between Foo and Bar A retrieve thing request with GET /foo returns a response which has status code 200' | ||
I, [2018-02-07T13:37:06.859217 #96807] INFO -- : Sending GET request to path: "/foo" with headers: {"HTTP_ACCEPT"=>"application/json"}, see debug logs for body | ||
D, [2018-02-07T13:37:06.859245 #96807] DEBUG -- : body : | ||
I, [2018-02-07T13:37:06.876198 #96807] INFO -- : Received response with status: 200, headers: {"Content-Type"=>"application/json", "Content-Length"=>"158"}, see debug logs for body | ||
D, [2018-02-07T13:37:06.876249 #96807] DEBUG -- : body: {"results":[{"name":"Games","sort_name":"Games","id":11,"shortname":"Games"},{"name":"Book Clubs","sort_name":"Book Clubs","id":18,"shortname":"Book Clubs"}]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# For assistance debugging failures | ||
|
||
* The pact files have been stored locally in the following temp directory: | ||
/Users/bethanyskurrie/workspace/pact-foundation/pact-ruby-e2e-example/tmp/pacts | ||
|
||
* The requests and responses are logged in the following log file: | ||
/Users/bethanyskurrie/workspace/pact-foundation/pact-ruby-e2e-example/log/pact.log | ||
|
||
* Add BACKTRACE=true to the `rake pact:verify` command to see the full backtrace | ||
|
||
* If the diff output is confusing, try using another diff formatter. | ||
The options are :unix, :embedded and :list | ||
|
||
Pact.configure do | config | | ||
config.diff_formatter = :embedded | ||
end | ||
|
||
See https://github.com/realestate-com-au/pact/blob/master/documentation/configuration.md#diff_formatter for examples and more information. | ||
|
||
* Check out https://github.com/realestate-com-au/pact/wiki/Troubleshooting | ||
|
||
* Ask a question in the google users' group https://groups.google.com/forum/#!forum/pact-support | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
puts "MONKEYPATCHING!" | ||
This comment has been minimized.
Sorry, something went wrong. |
||
|
||
class PreMonkeypatchTest | ||
include Pact::Consumer::RackRequestHelper | ||
end | ||
|
||
unless PreMonkeypatchTest.new.respond_to?(:standardise_header, true) | ||
raise "Can't find method Pact::Consumer::RackRequestHelper.standardise_header to monkeypatch" | ||
end | ||
|
||
module Pact::Consumer::RackRequestHelper | ||
def standardise_header header | ||
header.gsub(/^HTTP_/, '').downcase | ||
end | ||
end |
Sorry, ignore this. Accidental commit.