Commit 5a5eb5d9 authored by Luke Duncalfe's avatar Luke Duncalfe

Allow all Jira integrations to set deployment_type

Previously the `#testable?` check meant that instance and group-level
Jira integrations would set their `deployment_type` to `unknown`.

This change means they will set it to `cloud` or `server` when possible.

https://gitlab.com/gitlab-org/gitlab/-/issues/336486
parent 440e4556
......@@ -539,8 +539,7 @@ module Integrations
end
def update_deployment_type?
(api_url_changed? || url_changed? || username_changed? || password_changed?) &&
testable?
api_url_changed? || url_changed? || username_changed? || password_changed?
end
def update_deployment_type
......
......@@ -334,16 +334,6 @@ RSpec.describe Integrations::Jira do
end
end
context 'when not allowed to test an instance or group' do
it 'does not update deployment type' do
allow(integration).to receive(:testable?).and_return(false)
integration.update!(url: 'http://first.url')
expect(WebMock).not_to have_requested(:get, /serverInfo/)
end
end
context 'stored password invalidation' do
context 'when a password was previously set' do
context 'when only web url present' do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment