Commit 313c82d0 authored by Alex Kalderimis's avatar Alex Kalderimis

Rename bugzilla service

Renames `bugzilla_service` to `bugzilla_integration`
parent b8293b2f
......@@ -229,7 +229,7 @@ class Integration < ApplicationRecord
end
# used as part of the renaming effort
RENAMED_TO_INTEGRATION = %w[asana assembla bamboo].freeze
RENAMED_TO_INTEGRATION = %w[asana assembla bamboo bugzilla].freeze
def self.available_integration_names(**args)
available_services_names(**args)
......
......@@ -158,7 +158,7 @@ class Project < ApplicationRecord
has_one :asana_integration, class_name: 'Integrations::Asana'
has_one :assembla_integration, class_name: 'Integrations::Assembla'
has_one :bamboo_integration, class_name: 'Integrations::Bamboo'
has_one :bugzilla_service, class_name: 'Integrations::Bugzilla'
has_one :bugzilla_integration, class_name: 'Integrations::Bugzilla'
has_one :buildkite_service, class_name: 'Integrations::Buildkite'
has_one :campfire_service, class_name: 'Integrations::Campfire'
has_one :confluence_service, class_name: 'Integrations::Confluence'
......
......@@ -85,7 +85,7 @@ FactoryBot.define do
confluence_url { 'https://example.atlassian.net/wiki' }
end
factory :bugzilla_service, class: 'Integrations::Bugzilla' do
factory :bugzilla_integration, class: 'Integrations::Bugzilla' do
project
active { true }
issue_tracker
......
......@@ -291,7 +291,7 @@ RSpec.describe Gitlab::BackgroundMigration::MigrateIssueTrackersSensitiveData, s
services.create!(id: 20, type: 'JiraService', properties: jira_properties.to_json, category: 'issue_tracker')
end
let!(:bugzilla_service_valid) do
let!(:bugzilla_integration_valid) do
services.create!(id: 11, type: 'BugzillaService', title: nil, properties: tracker_properties.to_json, category: 'issue_tracker')
end
......@@ -314,14 +314,14 @@ RSpec.describe Gitlab::BackgroundMigration::MigrateIssueTrackersSensitiveData, s
expect(jira_service_valid.title).to eq(title)
expect(jira_service_valid.description).to eq(description)
bugzilla_service_valid.reload
data = IssueTrackerData.find_by(service_id: bugzilla_service_valid.id)
bugzilla_integration_valid.reload
data = IssueTrackerData.find_by(service_id: bugzilla_integration_valid.id)
expect(data.project_url).to eq(url)
expect(data.issues_url).to eq(issues_url)
expect(data.new_issue_url).to eq(new_issue_url)
expect(bugzilla_service_valid.title).to eq(title)
expect(bugzilla_service_valid.description).to eq(description)
expect(bugzilla_integration_valid.title).to eq(title)
expect(bugzilla_integration_valid.description).to eq(description)
end
end
end
......@@ -391,7 +391,7 @@ project:
- redmine_service
- youtrack_service
- custom_issue_tracker_service
- bugzilla_service
- bugzilla_integration
- ewm_service
- external_wiki_service
- mock_ci_service
......
......@@ -22,7 +22,7 @@ RSpec.describe MigrateIssueTrackersData do
services.create!(type: 'JiraService', properties: nil, category: 'issue_tracker')
end
let!(:bugzilla_service) do
let!(:bugzilla_integration) do
services.create!(type: 'BugzillaService', properties: properties, category: 'issue_tracker')
end
......@@ -55,7 +55,7 @@ RSpec.describe MigrateIssueTrackersData do
freeze_time do
migrate!
expect(migration_name).to be_scheduled_delayed_migration(3.minutes, jira_service.id, bugzilla_service.id)
expect(migration_name).to be_scheduled_delayed_migration(3.minutes, jira_service.id, bugzilla_integration.id)
expect(migration_name).to be_scheduled_delayed_migration(6.minutes, youtrack_service.id, gitlab_service.id)
expect(BackgroundMigrationWorker.jobs.size).to eq(2)
end
......
......@@ -22,7 +22,7 @@ RSpec.describe RescheduleMigrateIssueTrackersData do
services.create!(id: 11, type: 'JiraService', properties: nil, category: 'issue_tracker')
end
let!(:bugzilla_service) do
let!(:bugzilla_integration) do
services.create!(id: 12, type: 'BugzillaService', properties: properties, category: 'issue_tracker')
end
......@@ -56,7 +56,7 @@ RSpec.describe RescheduleMigrateIssueTrackersData do
freeze_time do
migrate!
expect(migration_name).to be_scheduled_delayed_migration(3.minutes, jira_service.id, bugzilla_service.id)
expect(migration_name).to be_scheduled_delayed_migration(3.minutes, jira_service.id, bugzilla_integration.id)
expect(migration_name).to be_scheduled_delayed_migration(6.minutes, youtrack_service.id, gitlab_service.id)
expect(BackgroundMigrationWorker.jobs.size).to eq(2)
end
......@@ -70,7 +70,7 @@ RSpec.describe RescheduleMigrateIssueTrackersData do
let!(:valid_issue_tracker_data) do
issue_tracker_data.create!(
service_id: bugzilla_service.id,
service_id: bugzilla_integration.id,
encrypted_issues_url: 'http://url.com',
encrypted_issues_url_iv: 'somevalue'
)
......@@ -78,7 +78,7 @@ RSpec.describe RescheduleMigrateIssueTrackersData do
let!(:invalid_issue_tracker_data) do
issue_tracker_data.create!(
service_id: bugzilla_service.id,
service_id: bugzilla_integration.id,
encrypted_issues_url: 'http:url.com',
encrypted_issues_url_iv: nil
)
......@@ -86,7 +86,7 @@ RSpec.describe RescheduleMigrateIssueTrackersData do
let!(:valid_jira_tracker_data) do
jira_tracker_data.create!(
service_id: bugzilla_service.id,
service_id: bugzilla_integration.id,
encrypted_url: 'http://url.com',
encrypted_url_iv: 'somevalue'
)
......@@ -94,7 +94,7 @@ RSpec.describe RescheduleMigrateIssueTrackersData do
let!(:invalid_jira_tracker_data) do
jira_tracker_data.create!(
service_id: bugzilla_service.id,
service_id: bugzilla_integration.id,
encrypted_url: 'http://url.com',
encrypted_url_iv: nil
)
......
......@@ -64,7 +64,7 @@ RSpec.describe Project, factory_default: :keep do
it { is_expected.to have_one(:redmine_service) }
it { is_expected.to have_one(:youtrack_service) }
it { is_expected.to have_one(:custom_issue_tracker_service) }
it { is_expected.to have_one(:bugzilla_service) }
it { is_expected.to have_one(:bugzilla_integration) }
it { is_expected.to have_one(:ewm_service) }
it { is_expected.to have_one(:external_wiki_service) }
it { is_expected.to have_one(:confluence_service) }
......
......@@ -8,7 +8,7 @@ RSpec.describe 'query Jira service' do
let_it_be(:current_user) { create(:user) }
let_it_be(:project) { create(:project) }
let_it_be(:jira_service) { create(:jira_service, project: project) }
let_it_be(:bugzilla_service) { create(:bugzilla_service, project: project) }
let_it_be(:bugzilla_integration) { create(:bugzilla_integration, project: project) }
let_it_be(:redmine_service) { create(:redmine_service, project: project) }
let(:query) do
......
......@@ -103,7 +103,7 @@ RSpec.describe Issues::CloseService do
end
context 'with an active external issue tracker not supporting close_issue' do
let!(:external_issue_tracker) { create(:bugzilla_service, project: project) }
let!(:external_issue_tracker) { create(:bugzilla_integration, project: project) }
it 'does not close the issue on the external issue tracker' do
project.reload
......
......@@ -735,7 +735,7 @@ RSpec.describe ::SystemNotes::IssuablesService do
end
it 'is true with issue tracker not supporting referencing' do
create(:bugzilla_service, project: project)
create(:bugzilla_integration, project: project)
project.reload
expect(service.cross_reference_disallowed?(noteable)).to be_truthy
......
......@@ -6,7 +6,7 @@ RSpec.describe PropagateIntegrationInheritWorker do
describe '#perform' do
let_it_be(:integration) { create(:redmine_service, :instance) }
let_it_be(:integration1) { create(:redmine_service, inherit_from_id: integration.id) }
let_it_be(:integration2) { create(:bugzilla_service, inherit_from_id: integration.id) }
let_it_be(:integration2) { create(:bugzilla_integration, inherit_from_id: integration.id) }
let_it_be(:integration3) { create(:redmine_service) }
it_behaves_like 'an idempotent worker' 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