Skip to content

Commit

Permalink
fix(basic auth): add missing basic auth credentials for retriving pac…
Browse files Browse the repository at this point in the history
…ts by URL

Closes: #42
  • Loading branch information
bethesque committed Nov 10, 2019
1 parent 72b0541 commit e84f9b8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/pact/provider_verifier/aggregate_pact_configs.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def call
attr_reader :pact_urls, :provider_name, :consumer_version_tags, :provider_version_tags, :pact_broker_base_url, :http_client_options

def specified_pact_uris
pact_urls.collect{ | url | Pact::PactBroker.build_pact_uri(url) }
pact_urls.collect{ | url | Pact::PactBroker.build_pact_uri(url, http_client_options) }
end

def pacts_urls_from_broker
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ module ProviderVerifier
it "returns the hardcoded urls" do
expect(subject).to eq [OpenStruct.new(uri: "http://pact-1")]
end

it "uses the basic auth credentials to retrieve the pact" do
expect(pact_broker_api).to receive(:build_pact_uri).with(pact_urls.first, http_client_options)
subject
end
end

context "with broker config" do
Expand Down

0 comments on commit e84f9b8

Please sign in to comment.