pact_broker-client 1.39.0 → 1.44.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/test.yml +21 -0
- data/.gitignore +1 -0
- data/CHANGELOG.md +52 -0
- data/Gemfile +4 -0
- data/README.md +39 -18
- data/doc/pacts/markdown/Pact Broker Client - Pact Broker.md +79 -280
- data/lib/pact_broker/client/backports.rb +9 -0
- data/lib/pact_broker/client/base_command.rb +95 -0
- data/lib/pact_broker/client/can_i_deploy.rb +20 -3
- data/lib/pact_broker/client/cli/broker.rb +20 -75
- data/lib/pact_broker/client/cli/custom_thor.rb +12 -0
- data/lib/pact_broker/client/cli/deployment_commands.rb +74 -0
- data/lib/pact_broker/client/cli/environment_commands.rb +70 -0
- data/lib/pact_broker/client/cli/pacticipant_commands.rb +53 -0
- data/lib/pact_broker/client/cli/record_deployment_long_desc.txt +0 -55
- data/lib/pact_broker/client/cli/version_selector_options_parser.rb +4 -0
- data/lib/pact_broker/client/colorize_notices.rb +31 -0
- data/lib/pact_broker/client/deployments.rb +4 -0
- data/lib/pact_broker/client/deployments/record_deployment.rb +38 -0
- data/lib/pact_broker/client/deployments/record_release.rb +99 -0
- data/lib/pact_broker/client/deployments/record_undeployment.rb +120 -0
- data/lib/pact_broker/client/describe_text_formatter.rb +23 -0
- data/lib/pact_broker/client/environments.rb +6 -0
- data/lib/pact_broker/client/environments/create_environment.rb +31 -0
- data/lib/pact_broker/client/environments/delete_environment.rb +27 -0
- data/lib/pact_broker/client/environments/describe_environment.rb +26 -0
- data/lib/pact_broker/client/environments/environment_command.rb +66 -0
- data/lib/pact_broker/client/environments/list_environments.rb +30 -0
- data/lib/pact_broker/client/environments/text_formatter.rb +30 -0
- data/lib/pact_broker/client/environments/update_environment.rb +31 -0
- data/lib/pact_broker/client/generate_display_name.rb +27 -0
- data/lib/pact_broker/client/hal/entity.rb +14 -4
- data/lib/pact_broker/client/hal/http_client.rb +8 -2
- data/lib/pact_broker/client/hal/link.rb +8 -0
- data/lib/pact_broker/client/hal_client_methods.rb +1 -3
- data/lib/pact_broker/client/matrix.rb +4 -0
- data/lib/pact_broker/client/matrix/abbreviate_version_number.rb +15 -0
- data/lib/pact_broker/client/matrix/resource.rb +26 -1
- data/lib/pact_broker/client/matrix/text_formatter.rb +28 -17
- data/lib/pact_broker/client/pacticipants.rb +6 -0
- data/lib/pact_broker/client/pacticipants/create.rb +24 -34
- data/lib/pact_broker/client/pacticipants/describe.rb +33 -0
- data/lib/pact_broker/client/pacticipants/list.rb +34 -0
- data/lib/pact_broker/client/pacticipants/text_formatter.rb +41 -0
- data/lib/pact_broker/client/publish_pacts.rb +7 -3
- data/lib/pact_broker/client/string_refinements.rb +56 -0
- data/lib/pact_broker/client/version.rb +1 -1
- data/lib/pact_broker/client/versions.rb +4 -1
- data/lib/pact_broker/client/versions/describe.rb +3 -1
- data/lib/pact_broker/client/versions/formatter.rb +3 -1
- data/lib/pact_broker/client/versions/json_formatter.rb +5 -3
- data/lib/pact_broker/client/versions/text_formatter.rb +3 -1
- data/pact-broker-client.gemspec +2 -0
- data/script/approve-all.sh +6 -0
- data/script/publish-pact.sh +24 -6
- data/script/record-deployments-and-releases.sh +10 -0
- data/spec/fixtures/approvals/can_i_deploy_ignore.approved.txt +13 -0
- data/spec/fixtures/approvals/describe_environment.approved.txt +7 -0
- data/spec/fixtures/approvals/describe_pacticipant.approved.txt +2 -0
- data/spec/fixtures/approvals/list_environments.approved.txt +3 -0
- data/spec/integration/describe_environment_spec.rb +31 -0
- data/spec/lib/pact_broker/client/can_i_deploy_spec.rb +47 -5
- data/spec/lib/pact_broker/client/cli/broker_can_i_deploy_spec.rb +5 -5
- data/spec/lib/pact_broker/client/cli/broker_publish_spec.rb +1 -1
- data/spec/lib/pact_broker/client/cli/broker_run_webhook_commands_spec.rb +3 -3
- data/spec/lib/pact_broker/client/cli/version_selector_options_parser_spec.rb +21 -0
- data/spec/lib/pact_broker/client/deployments/record_deployment_spec.rb +204 -0
- data/spec/lib/pact_broker/client/environments/delete_environment_spec.rb +120 -0
- data/spec/lib/pact_broker/client/environments/describe_environment_spec.rb +89 -0
- data/spec/lib/pact_broker/client/environments/update_environment_spec.rb +167 -0
- data/spec/lib/pact_broker/client/generate_display_name_spec.rb +39 -0
- data/spec/lib/pact_broker/client/hal/entity_spec.rb +2 -2
- data/spec/lib/pact_broker/client/pacticipants/create_spec.rb +2 -2
- data/spec/pacts/pact_broker_client-pact_broker.json +88 -287
- data/spec/service_providers/create_environment_spec.rb +78 -0
- data/spec/service_providers/list_environments_spec.rb +77 -0
- data/spec/service_providers/pact_broker_client_matrix_ignore_spec.rb +98 -0
- data/spec/service_providers/pacticipants_create_spec.rb +5 -4
- data/spec/service_providers/publish_pacts_spec.rb +5 -2
- data/spec/service_providers/record_deployment_spec.rb +17 -36
- data/spec/service_providers/record_release_spec.rb +135 -0
- data/spec/spec_helper.rb +15 -2
- data/spec/support/approvals.rb +26 -0
- data/spec/support/shared_context.rb +6 -2
- data/tasks/pact.rake +19 -1
- metadata +93 -7
- data/lib/pact_broker/client/versions/record_deployment.rb +0 -109
- data/lib/pact_broker/client/versions/record_undeployment.rb +0 -102
- data/spec/lib/pact_broker/client/versions/record_deployment_spec.rb +0 -82
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b9a0a2b003221c85dee29fcab0f035344c961a676faaa63c9eb7a86837726471
|
4
|
+
data.tar.gz: 0356350e5894b59fde846079ed48dee78f494de755728f5c91a01a9f6df25594
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 14ebf92314a784825a3788d5fb9e717e6b545cc2273c863095a3a43a679b24491df1e8cc8b810e4aa8a77d42cd004bcb79e76beff954d386a54f39fc00692ad7
|
7
|
+
data.tar.gz: 965f255b44bc7b9ca1a1bbc85c28a692167b1b08ac1e16c92d0751c8171b7d805a224cbcba7337ecaaa42f3cf85adcc1b53158318c711bf9f3af53828e9ca939
|
data/.github/workflows/test.yml
CHANGED
@@ -21,3 +21,24 @@ jobs:
|
|
21
21
|
ruby-version: ${{ matrix.ruby_version }}
|
22
22
|
- run: "bundle install"
|
23
23
|
- run: "bundle exec rake"
|
24
|
+
pact:
|
25
|
+
runs-on: "ubuntu-latest"
|
26
|
+
continue-on-error: true
|
27
|
+
strategy:
|
28
|
+
fail-fast: false
|
29
|
+
matrix:
|
30
|
+
feature: ["", "publish_contracts", "deployments"]
|
31
|
+
steps:
|
32
|
+
- uses: actions/checkout@v2
|
33
|
+
- uses: ruby/setup-ruby@v1
|
34
|
+
with:
|
35
|
+
ruby-version: "2.7"
|
36
|
+
- run: "bundle install"
|
37
|
+
- run: |
|
38
|
+
rm -rf spec/pacts/*
|
39
|
+
bundle exec rspec spec/service_providers/
|
40
|
+
bundle exec rake pact:publish:pactflow
|
41
|
+
env:
|
42
|
+
PACT_BROKER_TOKEN: ${{ secrets.PACTFLOW_PACT_OSS_TOKEN }}
|
43
|
+
PACT_BROKER_FEATURES: ${{ matrix.feature }}
|
44
|
+
TEST_FEATURE: ${{ matrix.feature }}
|
data/.gitignore
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,55 @@
|
|
1
|
+
<a name="v1.44.0"></a>
|
2
|
+
### v1.44.0 (2021-06-09)
|
3
|
+
|
4
|
+
#### Features
|
5
|
+
|
6
|
+
* add record-undeployment (feature toggled off) ([951d334](/../../commit/951d334))
|
7
|
+
* add describe-environment command ([cd11ebb](/../../commit/cd11ebb))
|
8
|
+
* add record-release (feature toggled off) ([e32e4e5](/../../commit/e32e4e5))
|
9
|
+
|
10
|
+
#### Bug Fixes
|
11
|
+
|
12
|
+
* hardcode file requires Fixes: https://github.com/pact-foundation/pact_broker-client/issues/88 ([581f2fd](/../../commit/581f2fd))
|
13
|
+
|
14
|
+
<a name="v1.43.0"></a>
|
15
|
+
### v1.43.0 (2021-06-03)
|
16
|
+
|
17
|
+
#### Features
|
18
|
+
|
19
|
+
* enable --ignore option for can-i-deploy without a feature toggle ([bcc9dfe](/../../commit/bcc9dfe))
|
20
|
+
|
21
|
+
<a name="v1.42.0"></a>
|
22
|
+
### v1.42.0 (2021-05-31)
|
23
|
+
|
24
|
+
#### Features
|
25
|
+
|
26
|
+
* add list-pacticipants ([fc8ce3b](/../../commit/fc8ce3b))
|
27
|
+
* add --display-name to create-or-update-pacticipant ([76f323b](/../../commit/76f323b))
|
28
|
+
* add backtrace to error output when verbose is true ([abf1ef0](/../../commit/abf1ef0))
|
29
|
+
* add list-environments and describe-environment ([4472d48](/../../commit/4472d48))
|
30
|
+
* add delete-environment ([361eed1](/../../commit/361eed1))
|
31
|
+
* add update-environment command ([95276cd](/../../commit/95276cd))
|
32
|
+
* add create-environment command ([a9fab50](/../../commit/a9fab50))
|
33
|
+
|
34
|
+
#### Bug Fixes
|
35
|
+
|
36
|
+
* stop long values in columns from being truncated ([18063fd](/../../commit/18063fd))
|
37
|
+
|
38
|
+
<a name="v1.41.0"></a>
|
39
|
+
### v1.41.0 (2021-05-25)
|
40
|
+
|
41
|
+
#### Features
|
42
|
+
|
43
|
+
* update colours of pact publish output ([2a51e37](/../../commit/2a51e37))
|
44
|
+
|
45
|
+
<a name="v1.40.0"></a>
|
46
|
+
### v1.40.0 (2021-04-26)
|
47
|
+
|
48
|
+
#### Features
|
49
|
+
|
50
|
+
* use the pb:publish-contracts relation and endpoint to publish pacts ([19f1b0b](/../../commit/19f1b0b))
|
51
|
+
* update publish pacts command to use new 'all in one' contract publishing endpoint ([50dfb11](/../../commit/50dfb11))
|
52
|
+
|
1
53
|
<a name="v1.39.0"></a>
|
2
54
|
### v1.39.0 (2021-04-27)
|
3
55
|
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -78,27 +78,48 @@ Usage:
|
|
78
78
|
pact-broker can-i-deploy -a, --pacticipant=PACTICIPANT -b, --broker-base-url=BROKER_BASE_URL
|
79
79
|
|
80
80
|
Options:
|
81
|
-
-a, --pacticipant=PACTICIPANT
|
82
|
-
|
83
|
-
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
81
|
+
-a, --pacticipant=PACTICIPANT
|
82
|
+
# The pacticipant name. Use once for each pacticipant being checked.
|
83
|
+
-e, [--version=VERSION]
|
84
|
+
# The pacticipant version. Must be entered after the --pacticipant that it relates to.
|
85
|
+
[--ignore=IGNORE]
|
86
|
+
# The pacticipant name to ignore. Use once for each pacticipant being ignored.
|
87
|
+
A specific version can be ignored by also specifying a --version after the pacticipant name option.
|
88
|
+
-l, [--latest=[TAG]]
|
89
|
+
# Use the latest pacticipant version. Optionally specify a TAG to use the
|
90
|
+
latest version with the specified tag.
|
91
|
+
[--to=TAG]
|
92
|
+
# This is too hard to explain in a short sentence. Look at the examples.
|
93
|
+
-o, [--output=OUTPUT]
|
94
|
+
# json or table
|
95
|
+
|
96
|
+
# Default: table
|
97
|
+
[--retry-while-unknown=TIMES]
|
98
|
+
# The number of times to retry while there is an unknown verification result
|
99
|
+
(ie. the provider verification is likely still running)
|
100
|
+
|
101
|
+
# Default: 0
|
102
|
+
[--retry-interval=SECONDS]
|
103
|
+
# The time between retries in seconds. Use in conjuction with --retry-while-unknown
|
104
|
+
|
105
|
+
# Default: 10
|
106
|
+
-b, --broker-base-url=BROKER_BASE_URL
|
107
|
+
# The base URL of the Pact Broker
|
108
|
+
-u, [--broker-username=BROKER_USERNAME]
|
109
|
+
# Pact Broker basic auth username
|
110
|
+
-p, [--broker-password=BROKER_PASSWORD]
|
111
|
+
# Pact Broker basic auth password
|
112
|
+
-k, [--broker-token=BROKER_TOKEN]
|
113
|
+
# Pact Broker bearer token
|
114
|
+
-v, [--verbose], [--no-verbose]
|
115
|
+
# Verbose output. Default: false
|
96
116
|
|
97
117
|
Description:
|
98
|
-
Returns exit code 0 or 1, indicating whether or not the specified pacticipant versions are
|
99
|
-
pact/verification details
|
118
|
+
Returns exit code 0 or 1, indicating whether or not the specified application (pacticipant) versions are
|
119
|
+
compatible (ie. safe to deploy). Prints out the relevant pact/verification details, indicating any
|
120
|
+
missing or failed verification results.
|
100
121
|
|
101
|
-
The environment variables PACT_BROKER_BASE_URL,
|
122
|
+
The environment variables PACT_BROKER_BASE_URL, PACT_BROKER_USERNAME and PACT_BROKER_PASSWORD may be used
|
102
123
|
instead of their respective command line options.
|
103
124
|
```
|
104
125
|
|
@@ -2,12 +2,6 @@
|
|
2
2
|
|
3
3
|
#### Requests from Pact Broker Client to Pact Broker
|
4
4
|
|
5
|
-
* [A request for a pacticipant version](#a_request_for_a_pacticipant_version_given_version_5556b8149bf8bac76bc30f50a8a2dd4c22c85f30_of_pacticipant_Foo_exists_with_2_environments_that_aren't_test_available_for_deployment) given version 5556b8149bf8bac76bc30f50a8a2dd4c22c85f30 of pacticipant Foo exists with 2 environments that aren't test available for deployment
|
6
|
-
|
7
|
-
* [A request for a pacticipant version](#a_request_for_a_pacticipant_version_given_version_5556b8149bf8bac76bc30f50a8a2dd4c22c85f30_of_pacticipant_Foo_exists_with_a_test_environment_available_for_deployment) given version 5556b8149bf8bac76bc30f50a8a2dd4c22c85f30 of pacticipant Foo exists with a test environment available for deployment
|
8
|
-
|
9
|
-
* [A request for a pacticipant version](#a_request_for_a_pacticipant_version_given_version_5556b8149bf8bac76bc30f50a8a2dd4c22c85f30_of_pacticipant_Foo_does_not_exist) given version 5556b8149bf8bac76bc30f50a8a2dd4c22c85f30 of pacticipant Foo does not exist
|
10
|
-
|
11
5
|
* [A request for the compatibility matrix for a pacticipant that does not exist](#a_request_for_the_compatibility_matrix_for_a_pacticipant_that_does_not_exist)
|
12
6
|
|
13
7
|
* [A request for the compatibility matrix for all versions of Foo and Bar](#a_request_for_the_compatibility_matrix_for_all_versions_of_Foo_and_Bar_given_the_pact_for_Foo_version_1.2.3_and_1.2.4_has_been_verified_by_Bar_version_4.5.6) given the pact for Foo version 1.2.3 and 1.2.4 has been verified by Bar version 4.5.6
|
@@ -26,8 +20,6 @@
|
|
26
20
|
|
27
21
|
* [A request for the compatibility matrix where only the version of Foo is specified](#a_request_for_the_compatibility_matrix_where_only_the_version_of_Foo_is_specified_given_the_pact_for_Foo_version_1.2.3_has_been_verified_by_Bar_version_4.5.6_and_version_5.6.7) given the pact for Foo version 1.2.3 has been verified by Bar version 4.5.6 and version 5.6.7
|
28
22
|
|
29
|
-
* [A request for the environments](#a_request_for_the_environments_given_an_environment_with_name_test_exists) given an environment with name test exists
|
30
|
-
|
31
23
|
* [A request for the index resource](#a_request_for_the_index_resource)
|
32
24
|
|
33
25
|
* [A request for the index resource](#a_request_for_the_index_resource_given_the_pacticipant_relations_are_present) given the pacticipant relations are present
|
@@ -36,12 +28,8 @@
|
|
36
28
|
|
37
29
|
* [A request for the index resource](#a_request_for_the_index_resource_given_the_pb:latest-version_relation_exists_in_the_index_resource) given the pb:latest-version relation exists in the index resource
|
38
30
|
|
39
|
-
* [A request for the index resource](#a_request_for_the_index_resource_given_the_pb:pacticipant-version_and_pb:environments_relations_exist_in_the_index_resource) given the pb:pacticipant-version and pb:environments relations exist in the index resource
|
40
|
-
|
41
31
|
* [A request for the index resource](#a_request_for_the_index_resource_given_the_pb:pacticipant-version_relation_exists_in_the_index_resource) given the pb:pacticipant-version relation exists in the index resource
|
42
32
|
|
43
|
-
* [A request for the index resource](#a_request_for_the_index_resource_given_the_pb:publish-contracts_relations_exists_in_the_index_resource) given the pb:publish-contracts relations exists in the index resource
|
44
|
-
|
45
33
|
* [A request for the index resource with the webhook relation](#a_request_for_the_index_resource_with_the_webhook_relation)
|
46
34
|
|
47
35
|
* [A request for the list of the latest pacts from all consumers for the Pricing Service'](#a_request_for_the_list_of_the_latest_pacts_from_all_consumers_for_the_Pricing_Service'_given_a_latest_pact_between_Condor_and_the_Pricing_Service_exists) given a latest pact between Condor and the Pricing Service exists
|
@@ -76,6 +64,8 @@
|
|
76
64
|
|
77
65
|
* [A request to create a webhook with every possible event type](#a_request_to_create_a_webhook_with_every_possible_event_type_given_the_'Pricing_Service'_and_'Condor'_already_exist_in_the_pact-broker) given the 'Pricing Service' and 'Condor' already exist in the pact-broker
|
78
66
|
|
67
|
+
* [A request to determine if Bar can be deployed with all Foo tagged prod, ignoring the verification for Foo version 3.4.5](#a_request_to_determine_if_Bar_can_be_deployed_with_all_Foo_tagged_prod,_ignoring_the_verification_for_Foo_version_3.4.5_given_provider_Bar_version_4.5.6_has_a_successful_verification_for_Foo_version_1.2.3_tagged_prod_and_a_failed_verification_for_version_3.4.5_tagged_prod) given provider Bar version 4.5.6 has a successful verification for Foo version 1.2.3 tagged prod and a failed verification for version 3.4.5 tagged prod
|
68
|
+
|
79
69
|
* [A request to get the Pricing Service](#a_request_to_get_the_Pricing_Service_given_the_'Pricing_Service'_already_exists_in_the_pact-broker) given the 'Pricing Service' already exists in the pact-broker
|
80
70
|
|
81
71
|
* [A request to get the Pricing Service](#a_request_to_get_the_Pricing_Service_given_the_'Pricing_Service'_does_not_exist_in_the_pact-broker) given the 'Pricing Service' does not exist in the pact-broker
|
@@ -94,10 +84,6 @@
|
|
94
84
|
|
95
85
|
* [A request to publish a pact with method put](#a_request_to_publish_a_pact_with_method_put_given_the_'Pricing_Service'_and_'Condor'_already_exist_in_the_pact-broker,_and_Condor_already_has_a_pact_published_for_version_1.3.0) given the 'Pricing Service' and 'Condor' already exist in the pact-broker, and Condor already has a pact published for version 1.3.0
|
96
86
|
|
97
|
-
* [A request to publish contracts](#a_request_to_publish_contracts)
|
98
|
-
|
99
|
-
* [A request to record a deployment](#a_request_to_record_a_deployment_given_version_5556b8149bf8bac76bc30f50a8a2dd4c22c85f30_of_pacticipant_Foo_exists_with_a_test_environment_available_for_deployment) given version 5556b8149bf8bac76bc30f50a8a2dd4c22c85f30 of pacticipant Foo exists with a test environment available for deployment
|
100
|
-
|
101
87
|
* [A request to register the repository URL of a pacticipant](#a_request_to_register_the_repository_URL_of_a_pacticipant_given_the_'Pricing_Service'_already_exists_in_the_pact-broker) given the 'Pricing Service' already exists in the pact-broker
|
102
88
|
|
103
89
|
* [A request to register the repository URL of a pacticipant](#a_request_to_register_the_repository_URL_of_a_pacticipant_given_the_'Pricing_Service'_does_not_exist_in_the_pact-broker) given the 'Pricing Service' does not exist in the pact-broker
|
@@ -130,87 +116,6 @@
|
|
130
116
|
|
131
117
|
#### Interactions
|
132
118
|
|
133
|
-
<a name="a_request_for_a_pacticipant_version_given_version_5556b8149bf8bac76bc30f50a8a2dd4c22c85f30_of_pacticipant_Foo_exists_with_2_environments_that_aren't_test_available_for_deployment"></a>
|
134
|
-
Given **version 5556b8149bf8bac76bc30f50a8a2dd4c22c85f30 of pacticipant Foo exists with 2 environments that aren't test available for deployment**, upon receiving **a request for a pacticipant version** from Pact Broker Client, with
|
135
|
-
```json
|
136
|
-
{
|
137
|
-
"method": "GET",
|
138
|
-
"path": "/HAL-REL-PLACEHOLDER-PB-PACTICIPANT-VERSION-Foo-5556b8149bf8bac76bc30f50a8a2dd4c22c85f30",
|
139
|
-
"headers": {
|
140
|
-
"Accept": "application/hal+json"
|
141
|
-
}
|
142
|
-
}
|
143
|
-
```
|
144
|
-
Pact Broker will respond with:
|
145
|
-
```json
|
146
|
-
{
|
147
|
-
"status": 200,
|
148
|
-
"headers": {
|
149
|
-
"Content-Type": "application/hal+json;charset=utf-8"
|
150
|
-
},
|
151
|
-
"body": {
|
152
|
-
"_links": {
|
153
|
-
"pb:record-deployment": [
|
154
|
-
{
|
155
|
-
"name": "prod",
|
156
|
-
"href": "href"
|
157
|
-
},
|
158
|
-
{
|
159
|
-
"name": "dev",
|
160
|
-
"href": "href"
|
161
|
-
}
|
162
|
-
]
|
163
|
-
}
|
164
|
-
}
|
165
|
-
}
|
166
|
-
```
|
167
|
-
<a name="a_request_for_a_pacticipant_version_given_version_5556b8149bf8bac76bc30f50a8a2dd4c22c85f30_of_pacticipant_Foo_exists_with_a_test_environment_available_for_deployment"></a>
|
168
|
-
Given **version 5556b8149bf8bac76bc30f50a8a2dd4c22c85f30 of pacticipant Foo exists with a test environment available for deployment**, upon receiving **a request for a pacticipant version** from Pact Broker Client, with
|
169
|
-
```json
|
170
|
-
{
|
171
|
-
"method": "GET",
|
172
|
-
"path": "/HAL-REL-PLACEHOLDER-PB-PACTICIPANT-VERSION-Foo-5556b8149bf8bac76bc30f50a8a2dd4c22c85f30",
|
173
|
-
"headers": {
|
174
|
-
"Accept": "application/hal+json"
|
175
|
-
}
|
176
|
-
}
|
177
|
-
```
|
178
|
-
Pact Broker will respond with:
|
179
|
-
```json
|
180
|
-
{
|
181
|
-
"status": 200,
|
182
|
-
"headers": {
|
183
|
-
"Content-Type": "application/hal+json;charset=utf-8"
|
184
|
-
},
|
185
|
-
"body": {
|
186
|
-
"_links": {
|
187
|
-
"pb:record-deployment": [
|
188
|
-
{
|
189
|
-
"name": "test",
|
190
|
-
"href": "http://localhost:1234/HAL-REL-PLACEHOLDER-PB-RECORD-DEPLOYMENT-FOO-5556B8149BF8BAC76BC30F50A8A2DD4C22C85F30-TEST"
|
191
|
-
}
|
192
|
-
]
|
193
|
-
}
|
194
|
-
}
|
195
|
-
}
|
196
|
-
```
|
197
|
-
<a name="a_request_for_a_pacticipant_version_given_version_5556b8149bf8bac76bc30f50a8a2dd4c22c85f30_of_pacticipant_Foo_does_not_exist"></a>
|
198
|
-
Given **version 5556b8149bf8bac76bc30f50a8a2dd4c22c85f30 of pacticipant Foo does not exist**, upon receiving **a request for a pacticipant version** from Pact Broker Client, with
|
199
|
-
```json
|
200
|
-
{
|
201
|
-
"method": "GET",
|
202
|
-
"path": "/HAL-REL-PLACEHOLDER-PB-PACTICIPANT-VERSION-Foo-5556b8149bf8bac76bc30f50a8a2dd4c22c85f30",
|
203
|
-
"headers": {
|
204
|
-
"Accept": "application/hal+json"
|
205
|
-
}
|
206
|
-
}
|
207
|
-
```
|
208
|
-
Pact Broker will respond with:
|
209
|
-
```json
|
210
|
-
{
|
211
|
-
"status": 404
|
212
|
-
}
|
213
|
-
```
|
214
119
|
<a name="a_request_for_the_compatibility_matrix_for_a_pacticipant_that_does_not_exist"></a>
|
215
120
|
Upon receiving **a request for the compatibility matrix for a pacticipant that does not exist** from Pact Broker Client, with
|
216
121
|
```json
|
@@ -632,36 +537,6 @@ Pact Broker will respond with:
|
|
632
537
|
}
|
633
538
|
}
|
634
539
|
```
|
635
|
-
<a name="a_request_for_the_environments_given_an_environment_with_name_test_exists"></a>
|
636
|
-
Given **an environment with name test exists**, upon receiving **a request for the environments** from Pact Broker Client, with
|
637
|
-
```json
|
638
|
-
{
|
639
|
-
"method": "GET",
|
640
|
-
"path": "/HAL-REL-PLACEHOLDER-PB-ENVIRONMENTS",
|
641
|
-
"headers": {
|
642
|
-
"Accept": "application/hal+json"
|
643
|
-
}
|
644
|
-
}
|
645
|
-
```
|
646
|
-
Pact Broker will respond with:
|
647
|
-
```json
|
648
|
-
{
|
649
|
-
"status": 200,
|
650
|
-
"headers": {
|
651
|
-
"Content-Type": "application/hal+json;charset=utf-8"
|
652
|
-
},
|
653
|
-
"body": {
|
654
|
-
"_links": {
|
655
|
-
"pb:environments": [
|
656
|
-
{
|
657
|
-
"name": "test",
|
658
|
-
"href": "href"
|
659
|
-
}
|
660
|
-
]
|
661
|
-
}
|
662
|
-
}
|
663
|
-
}
|
664
|
-
```
|
665
540
|
<a name="a_request_for_the_index_resource"></a>
|
666
541
|
Upon receiving **a request for the index resource** from Pact Broker Client, with
|
667
542
|
```json
|
@@ -779,36 +654,6 @@ Pact Broker will respond with:
|
|
779
654
|
}
|
780
655
|
}
|
781
656
|
```
|
782
|
-
<a name="a_request_for_the_index_resource_given_the_pb:pacticipant-version_and_pb:environments_relations_exist_in_the_index_resource"></a>
|
783
|
-
Given **the pb:pacticipant-version and pb:environments relations exist in the index resource**, upon receiving **a request for the index resource** from Pact Broker Client, with
|
784
|
-
```json
|
785
|
-
{
|
786
|
-
"method": "GET",
|
787
|
-
"path": "/",
|
788
|
-
"headers": {
|
789
|
-
"Accept": "application/hal+json"
|
790
|
-
}
|
791
|
-
}
|
792
|
-
```
|
793
|
-
Pact Broker will respond with:
|
794
|
-
```json
|
795
|
-
{
|
796
|
-
"status": 200,
|
797
|
-
"headers": {
|
798
|
-
"Content-Type": "application/hal+json;charset=utf-8"
|
799
|
-
},
|
800
|
-
"body": {
|
801
|
-
"_links": {
|
802
|
-
"pb:pacticipant-version": {
|
803
|
-
"href": "http://localhost:1234/HAL-REL-PLACEHOLDER-PB-PACTICIPANT-VERSION-{pacticipant}-{version}"
|
804
|
-
},
|
805
|
-
"pb:environments": {
|
806
|
-
"href": "http://localhost:1234/HAL-REL-PLACEHOLDER-PB-ENVIRONMENTS"
|
807
|
-
}
|
808
|
-
}
|
809
|
-
}
|
810
|
-
}
|
811
|
-
```
|
812
657
|
<a name="a_request_for_the_index_resource_given_the_pb:pacticipant-version_relation_exists_in_the_index_resource"></a>
|
813
658
|
Given **the pb:pacticipant-version relation exists in the index resource**, upon receiving **a request for the index resource** from Pact Broker Client, with
|
814
659
|
```json
|
@@ -836,33 +681,6 @@ Pact Broker will respond with:
|
|
836
681
|
}
|
837
682
|
}
|
838
683
|
```
|
839
|
-
<a name="a_request_for_the_index_resource_given_the_pb:publish-contracts_relations_exists_in_the_index_resource"></a>
|
840
|
-
Given **the pb:publish-contracts relations exists in the index resource**, upon receiving **a request for the index resource** from Pact Broker Client, with
|
841
|
-
```json
|
842
|
-
{
|
843
|
-
"method": "GET",
|
844
|
-
"path": "/",
|
845
|
-
"headers": {
|
846
|
-
"Accept": "application/hal+json"
|
847
|
-
}
|
848
|
-
}
|
849
|
-
```
|
850
|
-
Pact Broker will respond with:
|
851
|
-
```json
|
852
|
-
{
|
853
|
-
"status": 200,
|
854
|
-
"headers": {
|
855
|
-
"Content-Type": "application/hal+json;charset=utf-8"
|
856
|
-
},
|
857
|
-
"body": {
|
858
|
-
"_links": {
|
859
|
-
"pb:publish-contracts": {
|
860
|
-
"href": "http://localhost:1234/HAL-REL-PLACEHOLDER-PB-PUBLISH-CONTRACTS"
|
861
|
-
}
|
862
|
-
}
|
863
|
-
}
|
864
|
-
}
|
865
|
-
```
|
866
684
|
<a name="a_request_for_the_index_resource_with_the_webhook_relation"></a>
|
867
685
|
Upon receiving **a request for the index resource with the webhook relation** from Pact Broker Client, with
|
868
686
|
```json
|
@@ -1607,6 +1425,83 @@ Pact Broker will respond with:
|
|
1607
1425
|
}
|
1608
1426
|
}
|
1609
1427
|
```
|
1428
|
+
<a name="a_request_to_determine_if_Bar_can_be_deployed_with_all_Foo_tagged_prod,_ignoring_the_verification_for_Foo_version_3.4.5_given_provider_Bar_version_4.5.6_has_a_successful_verification_for_Foo_version_1.2.3_tagged_prod_and_a_failed_verification_for_version_3.4.5_tagged_prod"></a>
|
1429
|
+
Given **provider Bar version 4.5.6 has a successful verification for Foo version 1.2.3 tagged prod and a failed verification for version 3.4.5 tagged prod**, upon receiving **a request to determine if Bar can be deployed with all Foo tagged prod, ignoring the verification for Foo version 3.4.5** from Pact Broker Client, with
|
1430
|
+
```json
|
1431
|
+
{
|
1432
|
+
"method": "get",
|
1433
|
+
"path": "/matrix",
|
1434
|
+
"query": "q%5B%5D%5Bpacticipant%5D=Bar&q%5B%5D%5Bversion%5D=4.5.6&q%5B%5D%5Bpacticipant%5D=Foo&q%5B%5D%5Btag%5D=prod&latestby=cvpv&ignore%5B%5D%5Bpacticipant%5D=Foo&ignore%5B%5D%5Bversion%5D=3.4.5"
|
1435
|
+
}
|
1436
|
+
```
|
1437
|
+
Pact Broker will respond with:
|
1438
|
+
```json
|
1439
|
+
{
|
1440
|
+
"status": 200,
|
1441
|
+
"headers": {
|
1442
|
+
"Content-Type": "application/hal+json;charset=utf-8"
|
1443
|
+
},
|
1444
|
+
"body": {
|
1445
|
+
"summary": {
|
1446
|
+
"deployable": true,
|
1447
|
+
"ignored": 1
|
1448
|
+
},
|
1449
|
+
"notices": [
|
1450
|
+
{
|
1451
|
+
"text": "some notice",
|
1452
|
+
"type": "info"
|
1453
|
+
}
|
1454
|
+
],
|
1455
|
+
"matrix": [
|
1456
|
+
{
|
1457
|
+
"consumer": {
|
1458
|
+
"name": "Foo",
|
1459
|
+
"version": {
|
1460
|
+
"number": "1.2.3"
|
1461
|
+
}
|
1462
|
+
},
|
1463
|
+
"provider": {
|
1464
|
+
"name": "Bar",
|
1465
|
+
"version": {
|
1466
|
+
"number": "4.5.6"
|
1467
|
+
}
|
1468
|
+
},
|
1469
|
+
"verificationResult": {
|
1470
|
+
"success": true,
|
1471
|
+
"_links": {
|
1472
|
+
"self": {
|
1473
|
+
"href": "http://result"
|
1474
|
+
}
|
1475
|
+
}
|
1476
|
+
}
|
1477
|
+
},
|
1478
|
+
{
|
1479
|
+
"consumer": {
|
1480
|
+
"name": "Foo",
|
1481
|
+
"version": {
|
1482
|
+
"number": "3.4.5"
|
1483
|
+
}
|
1484
|
+
},
|
1485
|
+
"provider": {
|
1486
|
+
"name": "Bar",
|
1487
|
+
"version": {
|
1488
|
+
"number": "4.5.6"
|
1489
|
+
}
|
1490
|
+
},
|
1491
|
+
"verificationResult": {
|
1492
|
+
"success": false,
|
1493
|
+
"_links": {
|
1494
|
+
"self": {
|
1495
|
+
"href": "http://result"
|
1496
|
+
}
|
1497
|
+
}
|
1498
|
+
},
|
1499
|
+
"ignored": true
|
1500
|
+
}
|
1501
|
+
]
|
1502
|
+
}
|
1503
|
+
}
|
1504
|
+
```
|
1610
1505
|
<a name="a_request_to_get_the_Pricing_Service_given_the_'Pricing_Service'_already_exists_in_the_pact-broker"></a>
|
1611
1506
|
Given **the 'Pricing Service' already exists in the pact-broker**, upon receiving **a request to get the Pricing Service** from Pact Broker Client, with
|
1612
1507
|
```json
|
@@ -1959,102 +1854,6 @@ Pact Broker will respond with:
|
|
1959
1854
|
}
|
1960
1855
|
}
|
1961
1856
|
```
|
1962
|
-
<a name="a_request_to_publish_contracts"></a>
|
1963
|
-
Upon receiving **a request to publish contracts** from Pact Broker Client, with
|
1964
|
-
```json
|
1965
|
-
{
|
1966
|
-
"method": "POST",
|
1967
|
-
"path": "/HAL-REL-PLACEHOLDER-PB-PUBLISH-CONTRACTS",
|
1968
|
-
"headers": {
|
1969
|
-
"Content-Type": "application/json",
|
1970
|
-
"Accept": "application/hal+json"
|
1971
|
-
},
|
1972
|
-
"body": {
|
1973
|
-
"pacticipantName": "Foo",
|
1974
|
-
"pacticipantVersionNumber": "5556b8149bf8bac76bc30f50a8a2dd4c22c85f30",
|
1975
|
-
"branch": "main",
|
1976
|
-
"tags": [
|
1977
|
-
"dev"
|
1978
|
-
],
|
1979
|
-
"buildUrl": "http://build",
|
1980
|
-
"contracts": [
|
1981
|
-
{
|
1982
|
-
"consumerName": "Foo",
|
1983
|
-
"providerName": "Bar",
|
1984
|
-
"specification": "pact",
|
1985
|
-
"contentType": "application/json",
|
1986
|
-
"content": "eyJjb25zdW1lciI6eyJuYW1lIjoiRm9vIn0sInByb3ZpZGVyIjp7Im5hbWUiOiJCYXIifSwiaW50ZXJhY3Rpb25zIjpbeyJkZXNjcmlwdGlvbiI6ImFuIGV4YW1wbGUgcmVxdWVzdCIsInByb3ZpZGVyU3RhdGUiOiJhIHByb3ZpZGVyIHN0YXRlIiwicmVxdWVzdCI6eyJtZXRob2QiOiJHRVQiLCJwYXRoIjoiLyIsImhlYWRlcnMiOnt9fSwicmVzcG9uc2UiOnsic3RhdHVzIjoyMDAsImhlYWRlcnMiOnsiQ29udGVudC1UeXBlIjoiYXBwbGljYXRpb24vaGFsK2pzb24ifX19XSwibWV0YWRhdGEiOnsicGFjdFNwZWNpZmljYXRpb24iOnsidmVyc2lvbiI6IjIuMC4wIn19fQ==",
|
1987
|
-
"writeMode": "overwrite"
|
1988
|
-
}
|
1989
|
-
]
|
1990
|
-
}
|
1991
|
-
}
|
1992
|
-
```
|
1993
|
-
Pact Broker will respond with:
|
1994
|
-
```json
|
1995
|
-
{
|
1996
|
-
"status": 200,
|
1997
|
-
"headers": {
|
1998
|
-
"Content-Type": "application/hal+json;charset=utf-8"
|
1999
|
-
},
|
2000
|
-
"body": {
|
2001
|
-
"_embedded": {
|
2002
|
-
"pacticipant": {
|
2003
|
-
"name": "Foo"
|
2004
|
-
},
|
2005
|
-
"version": {
|
2006
|
-
"number": "5556b8149bf8bac76bc30f50a8a2dd4c22c85f30",
|
2007
|
-
"buildUrl": "http://build"
|
2008
|
-
}
|
2009
|
-
},
|
2010
|
-
"logs": [
|
2011
|
-
{
|
2012
|
-
"level": "info",
|
2013
|
-
"message": "some message"
|
2014
|
-
}
|
2015
|
-
],
|
2016
|
-
"_links": {
|
2017
|
-
"pb:pacticipant-version-tags": [
|
2018
|
-
{
|
2019
|
-
"name": "dev"
|
2020
|
-
}
|
2021
|
-
],
|
2022
|
-
"pb:contracts": [
|
2023
|
-
{
|
2024
|
-
"href": "http://some-pact"
|
2025
|
-
}
|
2026
|
-
]
|
2027
|
-
}
|
2028
|
-
}
|
2029
|
-
}
|
2030
|
-
```
|
2031
|
-
<a name="a_request_to_record_a_deployment_given_version_5556b8149bf8bac76bc30f50a8a2dd4c22c85f30_of_pacticipant_Foo_exists_with_a_test_environment_available_for_deployment"></a>
|
2032
|
-
Given **version 5556b8149bf8bac76bc30f50a8a2dd4c22c85f30 of pacticipant Foo exists with a test environment available for deployment**, upon receiving **a request to record a deployment** from Pact Broker Client, with
|
2033
|
-
```json
|
2034
|
-
{
|
2035
|
-
"method": "POST",
|
2036
|
-
"path": "/HAL-REL-PLACEHOLDER-PB-RECORD-DEPLOYMENT-FOO-5556B8149BF8BAC76BC30F50A8A2DD4C22C85F30-TEST",
|
2037
|
-
"headers": {
|
2038
|
-
"Content-Type": "application/json",
|
2039
|
-
"Accept": "application/hal+json"
|
2040
|
-
},
|
2041
|
-
"body": {
|
2042
|
-
"replacedPreviousDeployedVersion": true
|
2043
|
-
}
|
2044
|
-
}
|
2045
|
-
```
|
2046
|
-
Pact Broker will respond with:
|
2047
|
-
```json
|
2048
|
-
{
|
2049
|
-
"status": 201,
|
2050
|
-
"headers": {
|
2051
|
-
"Content-Type": "application/hal+json;charset=utf-8"
|
2052
|
-
},
|
2053
|
-
"body": {
|
2054
|
-
"replacedPreviousDeployedVersion": true
|
2055
|
-
}
|
2056
|
-
}
|
2057
|
-
```
|
2058
1857
|
<a name="a_request_to_register_the_repository_URL_of_a_pacticipant_given_the_'Pricing_Service'_already_exists_in_the_pact-broker"></a>
|
2059
1858
|
Given **the 'Pricing Service' already exists in the pact-broker**, upon receiving **a request to register the repository URL of a pacticipant** from Pact Broker Client, with
|
2060
1859
|
```json
|