Skip to content

Commit 7563fcf

Browse files
committed
feat: use pb relation in preference to beta relation when fetching pacts for verification
1 parent dd35366 commit 7563fcf

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

lib/pact/pact_broker/fetch_pact_uris_for_verification.rb

+4-3
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ class FetchPactURIsForVerification
1212
include PactSelectionDescription
1313
attr_reader :provider, :consumer_version_selectors, :provider_version_tags, :broker_base_url, :http_client_options, :http_client, :options
1414

15-
PACTS_FOR_VERIFICATION_RELATION = 'beta:provider-pacts-for-verification'.freeze
15+
PACTS_FOR_VERIFICATION_RELATION = 'pb:provider-pacts-for-verification'.freeze
16+
PACTS_FOR_VERIFICATION_RELATION_BETA = 'beta:provider-pacts-for-verification'.freeze
1617
PACTS = 'pacts'.freeze
1718
HREF = 'href'.freeze
1819
LINKS = '_links'.freeze
@@ -34,7 +35,7 @@ def self.call(provider, consumer_version_selectors, provider_version_tags, broke
3435
end
3536

3637
def call
37-
if index.can?(PACTS_FOR_VERIFICATION_RELATION)
38+
if index.can?(PACTS_FOR_VERIFICATION_RELATION) || index.can?(PACTS_FOR_VERIFICATION_RELATION_BETA)
3839
log_message
3940
pacts_for_verification
4041
else
@@ -63,7 +64,7 @@ def pacts_for_verification
6364

6465
def pacts_for_verification_entity
6566
index
66-
._link(PACTS_FOR_VERIFICATION_RELATION)
67+
._link(PACTS_FOR_VERIFICATION_RELATION, PACTS_FOR_VERIFICATION_RELATION_BETA)
6768
.expand(provider: provider)
6869
.post!(query)
6970
end

0 commit comments

Comments
 (0)