Skip to content

Commit

Permalink
chore: update http test data builder [ci-skip]
Browse files Browse the repository at this point in the history
  • Loading branch information
bethesque committed Dec 18, 2020
1 parent e6569d0 commit 0b31b0c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/pact_broker/test/http_test_data_builder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ def publish_pact(consumer: last_consumer_name, consumer_version:, provider: last
[*tag].each do | tag |
create_tag(pacticipant: consumer, version: consumer_version, tag: tag)
end
puts "" if [*tag].any?

content = generate_content(consumer, provider, content_id)
puts "Publishing pact for consumer #{consumer} version #{consumer_version} and provider #{provider}"
Expand Down Expand Up @@ -113,6 +114,12 @@ def verify_pact(index: 0, success:, provider: last_provider_name, provider_versi
pact_to_verify = @pacts_for_verification_response.body["_embedded"]["pacts"][index]
raise "No pact found to verify at index #{index}" unless pact_to_verify
url_of_pact_to_verify = pact_to_verify["_links"]["self"]["href"]

[*provider_version_tag].each do | tag |
create_tag(pacticipant: provider, version: provider_version, tag: tag)
end
puts "" if [*provider_version_tag].any?

pact_response = client.get(url_of_pact_to_verify).tap { |response| check_for_error(response) }
verification_results_url = pact_response.body["_links"]["pb:publish-verification-results"]["href"]

Expand Down

0 comments on commit 0b31b0c

Please sign in to comment.