Skip to content

Commit

Permalink
fix: honour the --broker-token CLI param
Browse files Browse the repository at this point in the history
  • Loading branch information
bethesque committed May 22, 2019
1 parent 8ce7800 commit 36bc88c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/pact/provider_verifier/app.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ def setup
set_environment_variables
require_rspec_monkeypatch_for_jsonl
require_pact_project_pact_helper # Beth: not sure if this is needed, hangover from pact-provider-proxy?
set_broker_token_env_var
end

def set_environment_variables
Expand Down Expand Up @@ -214,6 +215,12 @@ def wait_until_provider_available
end
end
end

def set_broker_token_env_var
if options.broker_token && !ENV['PACT_BROKER_TOKEN']
ENV['PACT_BROKER_TOKEN'] = options.broker_token
end
end
end
end
end

0 comments on commit 36bc88c

Please sign in to comment.