Broker¶
API for creating a contract and configuring the mock service.
Attributes¶
log = logging.getLogger(__name__)
module-attribute
¶
Classes¶
Broker(broker_base_url=None, broker_username=None, broker_password=None, broker_token=None)
¶
PactBroker helper functions.
:param broker_base_url: URL of the pact broker that pacts will be published to. Can also be supplied through the PACT_BROKER_BASE_URL environment variable. Defaults to None. :type broker_base_url: str :param broker_username: Username to use when connecting to the pact broker if authentication is required. Can also be supplied through the PACT_BROKER_USERNAME environment variable. Defaults to None. :type broker_username: str :param broker_password: Password to use when connecting to the pact broker if authentication is required. Strongly recommend supplying this value through the PACT_BROKER_PASSWORD environment variable instead. Defaults to None. :type broker_password: str :param broker_token: Authentication token to use when connecting to the pact broker. Strongly recommend supplying this value through the PACT_BROKER_TOKEN environment variable instead. Defaults to None.
Source code in src/pact/broker.py
Attributes¶
broker_base_url = broker_base_url
instance-attribute
¶
broker_password = broker_password
instance-attribute
¶
broker_token = broker_token
instance-attribute
¶
broker_username = broker_username
instance-attribute
¶
Functions¶
publish(consumer_name, version, pact_dir=None, tag_with_git_branch=None, consumer_tags=None, branch=None, build_url=None, auto_detect_version_properties=None)
¶
Publish the generated pact files to the specified pact broker.