From 509750728c252ce46d9a35b766182bd522112933 Mon Sep 17 00:00:00 2001 From: Beth Skurrie Date: Fri, 18 Dec 2020 16:51:56 +1100 Subject: [PATCH] chore: update http test data builder [ci-skip] --- lib/pact_broker/test/http_test_data_builder.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/pact_broker/test/http_test_data_builder.rb b/lib/pact_broker/test/http_test_data_builder.rb index d56efa2ed..bdc30dc98 100644 --- a/lib/pact_broker/test/http_test_data_builder.rb +++ b/lib/pact_broker/test/http_test_data_builder.rb @@ -25,7 +25,7 @@ def initialize(pact_broker_base_url, auth) end def sleep - Kernel.sleep 1 + Kernel.sleep 0.5 self end @@ -79,6 +79,7 @@ def publish_pact(consumer: last_consumer_name, consumer_version:, provider: last end def get_pacts_for_verification(provider: last_provider_name, provider_version_tag: , consumer_version_selectors:, enable_pending: false, include_wip_pacts_since: nil) + @last_provider_name = provider puts "Fetching pacts for verification for #{provider}" body = { providerVersionTags: [*provider_version_tag], @@ -111,6 +112,7 @@ def print_pacts_for_verification end def verify_pact(index: 0, success:, provider: last_provider_name, provider_version_tag: , provider_version: ) + @last_provider_name = provider 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"]