|
37 | 37 | @click.option( |
38 | 38 | 'username', '--pact-broker-username', |
39 | 39 | envvar='PACT_BROKER_USERNAME', |
40 | | - help='Username for Pact Broker basic authentication.') |
| 40 | + help='Username for Pact Broker basic authentication. Can also be specified' |
| 41 | + ' via the environment variable PACT_BROKER_USERNAME') |
41 | 42 | @click.option( |
42 | 43 | 'broker_base_url', '--pact-broker-url', |
43 | 44 | default='', |
44 | 45 | envvar='PACT_BROKER_BASE_URL', |
45 | | - help='Base URl for the Pact Broker instance to publish pacts to.') |
| 46 | + help='Base URl for the Pact Broker instance to publish pacts to. Can also be specified' |
| 47 | + ' via the environment variable PACT_BROKER_BASE_URL') |
46 | 48 | @click.option( |
47 | 49 | 'consumer_version_tag', '--consumer-version-tag', |
48 | 50 | default='', |
49 | 51 | multiple=True, |
50 | 52 | help='Retrieve the latest pacts with this consumer version tag. ' |
51 | | - 'Used in conjunction with --provider.') |
| 53 | + 'Used in conjunction with --provider. May be specified multiple times.') |
| 54 | +@click.option( |
| 55 | + 'consumer_version_selector', '--consumer-version-selector', |
| 56 | + default='', |
| 57 | + multiple=True, |
| 58 | + help='Retrieve the latest pacts with this consumer version selector. ' |
| 59 | + 'Used in conjunction with --provider. May be specified multiple times.') |
52 | 60 | @click.option( |
53 | 61 | 'provider_version_tag', '--provider-version-tag', |
54 | 62 | default='', |
|
80 | 88 | @click.option( |
81 | 89 | 'timeout', '-t', '--timeout', |
82 | 90 | default=30, |
83 | | - help='The duration in seconds we should wait to confirm verification' |
| 91 | + help='The duration in seconds we should wait to confirm that the verification' |
84 | 92 | ' process was successful. Defaults to 30.', |
85 | 93 | type=int) |
86 | 94 | @click.option( |
|
107 | 115 | 'log_level', '--log-level', |
108 | 116 | help='The logging level.') |
109 | 117 | def main(pacts, base_url, pact_url, pact_urls, states_url, states_setup_url, |
110 | | - username, broker_base_url, consumer_version_tag, provider_version_tag, |
111 | | - password, token, provider, headers, timeout, provider_app_version, |
112 | | - publish_verification_results, verbose, log_dir, log_level): |
| 118 | + username, broker_base_url, consumer_version_tag, consumer_version_selector, |
| 119 | + provider_version_tag, password, token, provider, headers, timeout, |
| 120 | + provider_app_version, publish_verification_results, verbose, log_dir, log_level): |
113 | 121 | """ |
114 | 122 | Verify one or more contracts against a provider service. |
115 | 123 |
|
@@ -162,6 +170,7 @@ def main(pacts, base_url, pact_url, pact_urls, states_url, states_setup_url, |
162 | 170 | 'timeout': timeout, |
163 | 171 | 'verbose': verbose, |
164 | 172 | 'consumer_tags': list(consumer_version_tag), |
| 173 | + 'consumer_selectors': list(consumer_version_selector), |
165 | 174 | 'provider_tags': list(provider_version_tag), |
166 | 175 | 'provider_states_setup_url': states_setup_url |
167 | 176 | } |
|
0 commit comments