pact_broker-client 1.40.0 → 1.45.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/test.yml +21 -0
- data/.gitignore +1 -0
- data/CHANGELOG.md +57 -0
- data/Gemfile +4 -0
- data/README.md +39 -22
- 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 +98 -0
- data/lib/pact_broker/client/can_i_deploy.rb +57 -5
- data/lib/pact_broker/client/cli/broker.rb +23 -76
- data/lib/pact_broker/client/cli/custom_thor.rb +12 -0
- data/lib/pact_broker/client/cli/deployment_commands.rb +94 -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_support_ended.rb +103 -0
- data/lib/pact_broker/client/deployments/record_undeployment.rb +127 -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 +31 -6
- 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 +6 -2
- 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 +12 -9
- data/script/record-deployments-and-releases.sh +18 -0
- data/spec/fixtures/approvals/can_i_deploy_failure_dry_run.approved.txt +7 -0
- data/spec/fixtures/approvals/can_i_deploy_ignore.approved.txt +13 -0
- data/spec/fixtures/approvals/can_i_deploy_success_dry_run.approved.txt +7 -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 +109 -7
- data/spec/lib/pact_broker/client/cli/broker_can_i_deploy_spec.rb +19 -6
- 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/deployments/record_support_ended_spec.rb +208 -0
- data/spec/lib/pact_broker/client/deployments/record_undeployment_spec.rb +219 -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/pact_broker_client_register_repository_spec.rb +2 -2
- 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 +132 -0
- data/spec/service_providers/record_undeployment_spec.rb +166 -0
- data/spec/spec_helper.rb +15 -2
- data/spec/support/approvals.rb +26 -0
- data/spec/support/shared_context.rb +8 -3
- data/tasks/pact.rake +21 -1
- metadata +104 -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: 99a06a67fbe9da6f970649c5159443669ed9ce419911e6178594944467255dd0
|
|
4
|
+
data.tar.gz: c45dcfa2fd158febe01b9094e2125b4a1637c716da3a6d11d3bd13a8ce19867c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6da2ec04fc73a54ae53bebc62ddb5ddfe1fe1db17b1f94d22a3e195edfb756ad6330e9a99ebfeb1a6f5d20be71c92df4c16c0a808a409623b9600fb59e2e6385
|
|
7
|
+
data.tar.gz: c714b39a69e0f96ffccabe9b6bc3097c0401a6c1931a0de89e57eae7c1e0c04ef5133e1c3d124df49b2dd294bdd90fe2415baeba365e1bf44fc40b45b4602164
|
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,60 @@
|
|
|
1
|
+
<a name="v1.45.0"></a>
|
|
2
|
+
### v1.45.0 (2021-06-16)
|
|
3
|
+
|
|
4
|
+
#### Features
|
|
5
|
+
|
|
6
|
+
* **can-i-deploy**
|
|
7
|
+
* allow dry-run to be enabled by setting ACT_BROKER_CAN_I_DEPLOY_DRY_RUN=true ([0562436](/../../commit/0562436))
|
|
8
|
+
* add --dry-run option ([9d90c79](/../../commit/9d90c79))
|
|
9
|
+
|
|
10
|
+
* add record-support-ended (feature toggled off) ([8f6b593](/../../commit/8f6b593))
|
|
11
|
+
* update record-undeployment (feature toggled off) ([0c0dd15](/../../commit/0c0dd15))
|
|
12
|
+
* update record-undeployment (feature toggled off) ([93046d5](/../../commit/93046d5))
|
|
13
|
+
|
|
14
|
+
<a name="v1.44.0"></a>
|
|
15
|
+
### v1.44.0 (2021-06-09)
|
|
16
|
+
|
|
17
|
+
#### Features
|
|
18
|
+
|
|
19
|
+
* add record-undeployment (feature toggled off) ([951d334](/../../commit/951d334))
|
|
20
|
+
* add describe-environment command ([cd11ebb](/../../commit/cd11ebb))
|
|
21
|
+
* add record-release (feature toggled off) ([e32e4e5](/../../commit/e32e4e5))
|
|
22
|
+
|
|
23
|
+
#### Bug Fixes
|
|
24
|
+
|
|
25
|
+
* hardcode file requires Fixes: https://github.com/pact-foundation/pact_broker-client/issues/88 ([581f2fd](/../../commit/581f2fd))
|
|
26
|
+
|
|
27
|
+
<a name="v1.43.0"></a>
|
|
28
|
+
### v1.43.0 (2021-06-03)
|
|
29
|
+
|
|
30
|
+
#### Features
|
|
31
|
+
|
|
32
|
+
* enable --ignore option for can-i-deploy without a feature toggle ([bcc9dfe](/../../commit/bcc9dfe))
|
|
33
|
+
|
|
34
|
+
<a name="v1.42.0"></a>
|
|
35
|
+
### v1.42.0 (2021-05-31)
|
|
36
|
+
|
|
37
|
+
#### Features
|
|
38
|
+
|
|
39
|
+
* add list-pacticipants ([fc8ce3b](/../../commit/fc8ce3b))
|
|
40
|
+
* add --display-name to create-or-update-pacticipant ([76f323b](/../../commit/76f323b))
|
|
41
|
+
* add backtrace to error output when verbose is true ([abf1ef0](/../../commit/abf1ef0))
|
|
42
|
+
* add list-environments and describe-environment ([4472d48](/../../commit/4472d48))
|
|
43
|
+
* add delete-environment ([361eed1](/../../commit/361eed1))
|
|
44
|
+
* add update-environment command ([95276cd](/../../commit/95276cd))
|
|
45
|
+
* add create-environment command ([a9fab50](/../../commit/a9fab50))
|
|
46
|
+
|
|
47
|
+
#### Bug Fixes
|
|
48
|
+
|
|
49
|
+
* stop long values in columns from being truncated ([18063fd](/../../commit/18063fd))
|
|
50
|
+
|
|
51
|
+
<a name="v1.41.0"></a>
|
|
52
|
+
### v1.41.0 (2021-05-25)
|
|
53
|
+
|
|
54
|
+
#### Features
|
|
55
|
+
|
|
56
|
+
* update colours of pact publish output ([2a51e37](/../../commit/2a51e37))
|
|
57
|
+
|
|
1
58
|
<a name="v1.40.0"></a>
|
|
2
59
|
### v1.40.0 (2021-04-26)
|
|
3
60
|
|
data/Gemfile
CHANGED
data/README.md
CHANGED
|
@@ -78,28 +78,45 @@ 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
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
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
|
|
88
|
+
pacticipant name option.
|
|
89
|
+
-l, [--latest=[TAG]]
|
|
90
|
+
# Use the latest pacticipant version. Optionally specify a TAG to use the
|
|
91
|
+
latest version with the specified tag.
|
|
92
|
+
[--to=TAG]
|
|
93
|
+
# This is too hard to explain in a short sentence. Look at the examples.
|
|
94
|
+
-o, [--output=OUTPUT]
|
|
95
|
+
# json or table
|
|
96
|
+
|
|
97
|
+
# Default: table
|
|
98
|
+
[--retry-while-unknown=TIMES]
|
|
99
|
+
# The number of times to retry while there is an unknown verification result
|
|
100
|
+
(ie. the provider verification is likely still running)
|
|
101
|
+
|
|
102
|
+
# Default: 0
|
|
103
|
+
[--retry-interval=SECONDS]
|
|
104
|
+
# The time between retries in seconds. Use in conjuction with --retry-while-unknown
|
|
105
|
+
|
|
106
|
+
# Default: 10
|
|
107
|
+
[--dry-run], [--no-dry-run]
|
|
108
|
+
# When enabled, always exits process with a success code. Can also be enabled by setting
|
|
109
|
+
the environment variable PACT_BROKER_CAN_I_DEPLOY_DRY_RUN=true.
|
|
110
|
+
-b, --broker-base-url=BROKER_BASE_URL
|
|
111
|
+
# The base URL of the Pact Broker
|
|
112
|
+
-u, [--broker-username=BROKER_USERNAME]
|
|
113
|
+
# Pact Broker basic auth username
|
|
114
|
+
-p, [--broker-password=BROKER_PASSWORD]
|
|
115
|
+
# Pact Broker basic auth password
|
|
116
|
+
-k, [--broker-token=BROKER_TOKEN]
|
|
117
|
+
# Pact Broker bearer token
|
|
118
|
+
-v, [--verbose], [--no-verbose]
|
|
119
|
+
# Verbose output. Default: false
|
|
103
120
|
```
|
|
104
121
|
|
|
105
122
|
Returns exit code 0 or 1, indicating whether or not the specified application (pacticipant) versions are compatible (ie. safe to deploy). Prints out the relevant pact/verification details, indicating any missing or failed verification results.
|
|
@@ -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
|