From 7563fcf904e1a08f091a182e03c43359329743ba Mon Sep 17 00:00:00 2001 From: Beth Skurrie Date: Sat, 12 Sep 2020 13:02:03 +1000 Subject: [PATCH] feat: use pb relation in preference to beta relation when fetching pacts for verification --- lib/pact/pact_broker/fetch_pact_uris_for_verification.rb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/pact/pact_broker/fetch_pact_uris_for_verification.rb b/lib/pact/pact_broker/fetch_pact_uris_for_verification.rb index 3c11a3c8..4bab2308 100644 --- a/lib/pact/pact_broker/fetch_pact_uris_for_verification.rb +++ b/lib/pact/pact_broker/fetch_pact_uris_for_verification.rb @@ -12,7 +12,8 @@ class FetchPactURIsForVerification include PactSelectionDescription attr_reader :provider, :consumer_version_selectors, :provider_version_tags, :broker_base_url, :http_client_options, :http_client, :options - PACTS_FOR_VERIFICATION_RELATION = 'beta:provider-pacts-for-verification'.freeze + PACTS_FOR_VERIFICATION_RELATION = 'pb:provider-pacts-for-verification'.freeze + PACTS_FOR_VERIFICATION_RELATION_BETA = 'beta:provider-pacts-for-verification'.freeze PACTS = 'pacts'.freeze HREF = 'href'.freeze LINKS = '_links'.freeze @@ -34,7 +35,7 @@ def self.call(provider, consumer_version_selectors, provider_version_tags, broke end def call - if index.can?(PACTS_FOR_VERIFICATION_RELATION) + if index.can?(PACTS_FOR_VERIFICATION_RELATION) || index.can?(PACTS_FOR_VERIFICATION_RELATION_BETA) log_message pacts_for_verification else @@ -63,7 +64,7 @@ def pacts_for_verification def pacts_for_verification_entity index - ._link(PACTS_FOR_VERIFICATION_RELATION) + ._link(PACTS_FOR_VERIFICATION_RELATION, PACTS_FOR_VERIFICATION_RELATION_BETA) .expand(provider: provider) .post!(query) end