-
-
Notifications
You must be signed in to change notification settings - Fork 178
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(publish test result): allow json test results to be published wi…
…th the verification result
- Loading branch information
Showing
10 changed files
with
100 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
require_relative 'migration_helper' | ||
|
||
Sequel.migration do | ||
change do | ||
add_column(:verifications, :test_results, PactBroker::MigrationHelper.large_text_type) | ||
end | ||
end |
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,57 @@ | ||
{ | ||
"success": true, | ||
"providerApplicationVersion": "1.0.0", | ||
"testResults": { | ||
"examples": [ | ||
{ | ||
"description": "has status code 200", | ||
"file_path": "/redacted/.gem/ruby/2.4.1/gems/pact-1.17.0/lib/pact/provider/rspec.rb", | ||
"full_description": "Verifying a pact between me and they Greeting with GET / returns a response which has status code 200", | ||
"id": "/redacted/.gem/ruby/2.4.1/gems/pact-1.17.0/lib/pact/provider/rspec.rb[1:1:1:1:1]", | ||
"line_number": 122, | ||
"pending_message": null, | ||
"run_time": 0.111762, | ||
"status": "passed" | ||
}, | ||
{ | ||
"description": "has a matching body", | ||
"file_path": "/redacted/.gem/ruby/2.4.1/gems/pact-1.17.0/lib/pact/provider/rspec.rb", | ||
"full_description": "Verifying a pact between me and they Greeting with GET / returns a response which has a matching body", | ||
"id": "/redacted/.gem/ruby/2.4.1/gems/pact-1.17.0/lib/pact/provider/rspec.rb[1:1:1:1:3]", | ||
"line_number": 139, | ||
"pending_message": null, | ||
"run_time": 0.000235, | ||
"status": "passed" | ||
}, | ||
{ | ||
"description": "has status code 200", | ||
"file_path": "/redacted/.gem/ruby/2.4.1/gems/pact-1.17.0/lib/pact/provider/rspec.rb", | ||
"full_description": "Verifying a pact between me and they Given There is a greeting Provider state success with GET /somestate returns a response which has status code 200", | ||
"id": "/redacted/.gem/ruby/2.4.1/gems/pact-1.17.0/lib/pact/provider/rspec.rb[1:2:1:1:1:1]", | ||
"line_number": 122, | ||
"pending_message": null, | ||
"run_time": 0.006892, | ||
"status": "passed" | ||
}, | ||
{ | ||
"description": "has a matching body", | ||
"file_path": "/redacted/.gem/ruby/2.4.1/gems/pact-1.17.0/lib/pact/provider/rspec.rb", | ||
"full_description": "Verifying a pact between me and they Given There is a greeting Provider state success with GET /somestate returns a response which has a matching body", | ||
"id": "/redacted/.gem/ruby/2.4.1/gems/pact-1.17.0/lib/pact/provider/rspec.rb[1:2:1:1:1:3]", | ||
"line_number": 139, | ||
"pending_message": null, | ||
"run_time": 0.000176, | ||
"status": "passed" | ||
} | ||
], | ||
"summary": { | ||
"duration": 0.123096, | ||
"errors_outside_of_examples_count": 0, | ||
"example_count": 4, | ||
"failure_count": 0, | ||
"pending_count": 0 | ||
}, | ||
"summary_line": "4 examples, 0 failures", | ||
"version": "3.7.0" | ||
} | ||
} |
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,5 @@ | ||
BASE_URL="http://localhost:9292" | ||
|
||
response_body=$(curl ${BASE_URL}/pacts/provider/Bar/consumer/Foo/latest) | ||
verification_url=$(echo "${response_body}" | ruby -e "require 'json'; puts JSON.parse(ARGF.read)['_links']['pb:publish-verification-results']['href']") | ||
curl -XPOST -H 'Content-Type: application/json' -d@script/foo-bar-verification.json ${verification_url} |
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 |
---|---|---|
@@ -1,4 +1,7 @@ | ||
{ | ||
"success": true, | ||
"providerApplicationVersion": "4.5.6" | ||
"providerApplicationVersion": "4.5.6", | ||
"testResults": { | ||
"some": "results" | ||
} | ||
} |
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