pact-foundation / pact-mock_service

Provides a mock service for use with Pact
https://pact.io
MIT License
72 stars 68 forks source link

feat: add token, username and password options to stub service #118

Closed mefellows closed 4 years ago

mefellows commented 4 years ago

Fixes #82.

Exposes the following new flags:

  -n, [--broker-username=BROKER_USERNAME]  # Pact Broker basic auth username
  -p, [--broker-password=BROKER_PASSWORD]  # Pact Broker basic auth password
  -k, [--broker-token=BROKER_TOKEN]        # Pact Broker bearer token

You may also specify the token via the env var PACT_BROKER_TOKEN.

There wasn't an obvious place to add tests for this, but seemed like a good thing to get in as a draft PR for review.

bethesque commented 4 years ago

LGTM.