From d3acd1a620f02fa9c9266244300d408c9a8c1e62 Mon Sep 17 00:00:00 2001 From: Beth Skurrie Date: Thu, 15 Nov 2018 15:09:24 +1100 Subject: [PATCH] feat: pass verbose flag through to HAL client when fetching pacts --- lib/pact/provider_verifier/app.rb | 2 +- spec/integration_with_pact_broker_config_spec.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/pact/provider_verifier/app.rb b/lib/pact/provider_verifier/app.rb index 88fd243..7bb0ab5 100644 --- a/lib/pact/provider_verifier/app.rb +++ b/lib/pact/provider_verifier/app.rb @@ -164,7 +164,7 @@ def reset_pact_configuration end def all_pact_urls - http_client_options = { username: options.broker_username, password: options.broker_password } + http_client_options = { username: options.broker_username, password: options.broker_password, verbose: options.verbose } AggregatePactConfigs.call(pact_urls, options.provider, consumer_version_tags, options.pact_broker_base_url, http_client_options) end diff --git a/spec/integration_with_pact_broker_config_spec.rb b/spec/integration_with_pact_broker_config_spec.rb index fdb9ae8..94959f5 100644 --- a/spec/integration_with_pact_broker_config_spec.rb +++ b/spec/integration_with_pact_broker_config_spec.rb @@ -23,12 +23,12 @@ end it "fetches the pact URIs from the broker" do - expect(pact_broker_api).to receive(:fetch_pact_uris).with("Foo", ["master", "prod"], "http://localhost:5738", { username: "username", password: "password" }) + expect(pact_broker_api).to receive(:fetch_pact_uris).with("Foo", ["master", "prod"], "http://localhost:5738", { username: "username", password: "password", verbose: nil }) subject end it "fetches the pending pacts URIs from the broker" do - expect(pact_broker_api).to receive(:fetch_pending_pact_uris).with("Foo", "http://localhost:5738", { username: "username", password: "password" }) + expect(pact_broker_api).to receive(:fetch_pending_pact_uris).with("Foo", "http://localhost:5738", { username: "username", password: "password", verbose: nil }) subject end