diff --git a/lib/pact_broker/versions/service.rb b/lib/pact_broker/versions/service.rb index 8d5fc7310..418f5d9d3 100644 --- a/lib/pact_broker/versions/service.rb +++ b/lib/pact_broker/versions/service.rb @@ -8,17 +8,20 @@ class Service extend PactBroker::Repositories def self.conflict_errors(existing_version, open_struct_version, version_url) - if existing_version&.branch && open_struct_version.to_h.key?(:branch) && existing_version.branch != open_struct_version.branch - message_params = { - old_branch: existing_version&.branch, - new_branch: open_struct_version.branch, - version_url: version_url - } - error_message = message("errors.validation.cannot_modify_version_branch", message_params) - { branch: [error_message] } - else - {} - end + # This validation is causing problems in the PF build when branches are merged + # TODO remove this properly when re-doing the version -> branch relationship + {} + # if existing_version&.branch && open_struct_version.to_h.key?(:branch) && existing_version.branch != open_struct_version.branch + # message_params = { + # old_branch: existing_version&.branch, + # new_branch: open_struct_version.branch, + # version_url: version_url + # } + # error_message = message("errors.validation.cannot_modify_version_branch", message_params) + # { branch: [error_message] } + # else + # {} + # end end def self.find_latest_by_pacticpant_name params diff --git a/spec/features/update_version_spec.rb b/spec/features/update_version_spec.rb index 746f2c3d8..41e4c5891 100644 --- a/spec/features/update_version_spec.rb +++ b/spec/features/update_version_spec.rb @@ -38,7 +38,7 @@ its(:status) { is_expected.to eq 200 } end - context "when the existing version has a branch, and the new branch is different" do + context "when the existing version has a branch, and the new branch is different", skip: true do let(:version_hash) { { branch: "new-branch" } } its(:status) { is_expected.to eq 409 } @@ -48,7 +48,7 @@ end end - context "when the existing version has a branch, and the new branch is nil" do + context "when the existing version has a branch, and the new branch is nil", skip: true do let(:version_hash) { { branch: nil } } its(:status) { is_expected.to eq 409 } @@ -117,7 +117,7 @@ .create_consumer_version_tag("dev") end - context "when the branch is attempted to be changed" do + context "when the branch is attempted to be changed", skip: true do let(:version_hash) { { branch: "new-branch" } } its(:status) { is_expected.to eq 409 }