Commit 821e705a authored by Patrick Bajao's avatar Patrick Bajao

Merge branch '330300-ajk-uwy' into 'master'

Rename project integration associations: UWY [RUN AS-IF-FOSS]

See merge request gitlab-org/gitlab!64434
parents 45b9cfc2 150dc86e
...@@ -54,6 +54,9 @@ class Integration < ApplicationRecord ...@@ -54,6 +54,9 @@ class Integration < ApplicationRecord
redmine redmine
slack slack_slash_commands slack slack_slash_commands
teamcity teamcity
unify_circuit
webex_teams
youtrack
].to_set.freeze ].to_set.freeze
def self.renamed?(name) def self.renamed?(name)
......
...@@ -188,9 +188,9 @@ class Project < ApplicationRecord ...@@ -188,9 +188,9 @@ class Project < ApplicationRecord
has_one :slack_integration, class_name: 'Integrations::Slack' has_one :slack_integration, class_name: 'Integrations::Slack'
has_one :slack_slash_commands_integration, class_name: 'Integrations::SlackSlashCommands' has_one :slack_slash_commands_integration, class_name: 'Integrations::SlackSlashCommands'
has_one :teamcity_integration, class_name: 'Integrations::Teamcity' has_one :teamcity_integration, class_name: 'Integrations::Teamcity'
has_one :unify_circuit_service, class_name: 'Integrations::UnifyCircuit' has_one :unify_circuit_integration, class_name: 'Integrations::UnifyCircuit'
has_one :webex_teams_service, class_name: 'Integrations::WebexTeams' has_one :webex_teams_integration, class_name: 'Integrations::WebexTeams'
has_one :youtrack_service, class_name: 'Integrations::Youtrack' has_one :youtrack_integration, class_name: 'Integrations::Youtrack'
has_one :root_of_fork_network, has_one :root_of_fork_network,
foreign_key: 'root_project_id', foreign_key: 'root_project_id',
......
...@@ -97,7 +97,7 @@ FactoryBot.define do ...@@ -97,7 +97,7 @@ FactoryBot.define do
issue_tracker issue_tracker
end end
factory :youtrack_service, class: 'Integrations::Youtrack' do factory :youtrack_integration, class: 'Integrations::Youtrack' do
project project
active { true } active { true }
issue_tracker issue_tracker
......
...@@ -402,7 +402,7 @@ FactoryBot.define do ...@@ -402,7 +402,7 @@ FactoryBot.define do
factory :youtrack_project, parent: :project do factory :youtrack_project, parent: :project do
has_external_issue_tracker { true } has_external_issue_tracker { true }
youtrack_service youtrack_integration
end end
factory :jira_project, parent: :project do factory :jira_project, parent: :project do
......
...@@ -140,7 +140,9 @@ RSpec.describe Banzai::Filter::References::ExternalIssueReferenceFilter do ...@@ -140,7 +140,9 @@ RSpec.describe Banzai::Filter::References::ExternalIssueReferenceFilter do
end end
context "youtrack project" do context "youtrack project" do
let_it_be(:service) { create(:youtrack_service, project: project) } before_all do
create(:youtrack_integration, project: project)
end
before do before do
project.update!(issues_enabled: false) project.update!(issues_enabled: false)
......
...@@ -381,14 +381,14 @@ project: ...@@ -381,14 +381,14 @@ project:
- microsoft_teams_integration - microsoft_teams_integration
- mattermost_integration - mattermost_integration
- hangouts_chat_integration - hangouts_chat_integration
- unify_circuit_service - unify_circuit_integration
- buildkite_integration - buildkite_integration
- bamboo_integration - bamboo_integration
- teamcity_integration - teamcity_integration
- pushover_integration - pushover_integration
- jira_integration - jira_integration
- redmine_integration - redmine_integration
- youtrack_service - youtrack_integration
- custom_issue_tracker_integration - custom_issue_tracker_integration
- bugzilla_integration - bugzilla_integration
- ewm_integration - ewm_integration
...@@ -557,7 +557,7 @@ project: ...@@ -557,7 +557,7 @@ project:
- alert_management_alerts - alert_management_alerts
- repository_storage_moves - repository_storage_moves
- freeze_periods - freeze_periods
- webex_teams_service - webex_teams_integration
- build_report_results - build_report_results
- vulnerability_statistic - vulnerability_statistic
- vulnerability_historical_statistics - vulnerability_historical_statistics
......
...@@ -26,11 +26,11 @@ RSpec.describe MigrateIssueTrackersData do ...@@ -26,11 +26,11 @@ RSpec.describe MigrateIssueTrackersData do
services.create!(type: 'BugzillaService', properties: properties, category: 'issue_tracker') services.create!(type: 'BugzillaService', properties: properties, category: 'issue_tracker')
end end
let!(:youtrack_service) do let!(:youtrack_integration) do
services.create!(type: 'YoutrackService', properties: properties, category: 'issue_tracker') services.create!(type: 'YoutrackService', properties: properties, category: 'issue_tracker')
end end
let!(:youtrack_service_empty) do let!(:youtrack_integration_empty) do
services.create!(type: 'YoutrackService', properties: '', category: 'issue_tracker') services.create!(type: 'YoutrackService', properties: '', category: 'issue_tracker')
end end
...@@ -56,7 +56,7 @@ RSpec.describe MigrateIssueTrackersData do ...@@ -56,7 +56,7 @@ RSpec.describe MigrateIssueTrackersData do
migrate! migrate!
expect(migration_name).to be_scheduled_delayed_migration(3.minutes, jira_integration.id, bugzilla_integration.id) expect(migration_name).to be_scheduled_delayed_migration(3.minutes, jira_integration.id, bugzilla_integration.id)
expect(migration_name).to be_scheduled_delayed_migration(6.minutes, youtrack_service.id, gitlab_service.id) expect(migration_name).to be_scheduled_delayed_migration(6.minutes, youtrack_integration.id, gitlab_service.id)
expect(BackgroundMigrationWorker.jobs.size).to eq(2) expect(BackgroundMigrationWorker.jobs.size).to eq(2)
end end
end end
......
...@@ -26,11 +26,11 @@ RSpec.describe RescheduleMigrateIssueTrackersData do ...@@ -26,11 +26,11 @@ RSpec.describe RescheduleMigrateIssueTrackersData do
services.create!(id: 12, type: 'BugzillaService', properties: properties, category: 'issue_tracker') services.create!(id: 12, type: 'BugzillaService', properties: properties, category: 'issue_tracker')
end end
let!(:youtrack_service) do let!(:youtrack_integration) do
services.create!(id: 13, type: 'YoutrackService', properties: properties, category: 'issue_tracker') services.create!(id: 13, type: 'YoutrackService', properties: properties, category: 'issue_tracker')
end end
let!(:youtrack_service_empty) do let!(:youtrack_integration_empty) do
services.create!(id: 14, type: 'YoutrackService', properties: '', category: 'issue_tracker') services.create!(id: 14, type: 'YoutrackService', properties: '', category: 'issue_tracker')
end end
...@@ -57,7 +57,7 @@ RSpec.describe RescheduleMigrateIssueTrackersData do ...@@ -57,7 +57,7 @@ RSpec.describe RescheduleMigrateIssueTrackersData do
migrate! migrate!
expect(migration_name).to be_scheduled_delayed_migration(3.minutes, jira_integration.id, bugzilla_integration.id) expect(migration_name).to be_scheduled_delayed_migration(3.minutes, jira_integration.id, bugzilla_integration.id)
expect(migration_name).to be_scheduled_delayed_migration(6.minutes, youtrack_service.id, gitlab_service.id) expect(migration_name).to be_scheduled_delayed_migration(6.minutes, youtrack_integration.id, gitlab_service.id)
expect(BackgroundMigrationWorker.jobs.size).to eq(2) expect(BackgroundMigrationWorker.jobs.size).to eq(2)
end end
end end
......
...@@ -39,8 +39,8 @@ RSpec.describe Project, factory_default: :keep do ...@@ -39,8 +39,8 @@ RSpec.describe Project, factory_default: :keep do
it { is_expected.to have_one(:microsoft_teams_integration) } it { is_expected.to have_one(:microsoft_teams_integration) }
it { is_expected.to have_one(:mattermost_integration) } it { is_expected.to have_one(:mattermost_integration) }
it { is_expected.to have_one(:hangouts_chat_integration) } it { is_expected.to have_one(:hangouts_chat_integration) }
it { is_expected.to have_one(:unify_circuit_service) } it { is_expected.to have_one(:unify_circuit_integration) }
it { is_expected.to have_one(:webex_teams_service) } it { is_expected.to have_one(:webex_teams_integration) }
it { is_expected.to have_one(:packagist_integration) } it { is_expected.to have_one(:packagist_integration) }
it { is_expected.to have_one(:pushover_integration) } it { is_expected.to have_one(:pushover_integration) }
it { is_expected.to have_one(:asana_integration) } it { is_expected.to have_one(:asana_integration) }
...@@ -62,7 +62,7 @@ RSpec.describe Project, factory_default: :keep do ...@@ -62,7 +62,7 @@ RSpec.describe Project, factory_default: :keep do
it { is_expected.to have_one(:teamcity_integration) } it { is_expected.to have_one(:teamcity_integration) }
it { is_expected.to have_one(:jira_integration) } it { is_expected.to have_one(:jira_integration) }
it { is_expected.to have_one(:redmine_integration) } it { is_expected.to have_one(:redmine_integration) }
it { is_expected.to have_one(:youtrack_service) } it { is_expected.to have_one(:youtrack_integration) }
it { is_expected.to have_one(:custom_issue_tracker_integration) } it { is_expected.to have_one(:custom_issue_tracker_integration) }
it { is_expected.to have_one(:bugzilla_integration) } it { is_expected.to have_one(:bugzilla_integration) }
it { is_expected.to have_one(:ewm_integration) } it { is_expected.to have_one(:ewm_integration) }
......
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