Commit 95af2964 authored by Luke Duncalfe's avatar Luke Duncalfe

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

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

See merge request gitlab-org/gitlab!64215
parents e3159dcf 37267dc3
......@@ -48,6 +48,7 @@ class Integration < ApplicationRecord
flowdock
hangouts_chat
irker
packagist pipelines_email pivotaltracker pushover
].to_set.freeze
def self.renamed?(name)
......
......@@ -178,10 +178,10 @@ class Project < ApplicationRecord
has_one :mattermost_slash_commands_service, class_name: 'Integrations::MattermostSlashCommands'
has_one :microsoft_teams_service, class_name: 'Integrations::MicrosoftTeams'
has_one :mock_ci_service, class_name: 'Integrations::MockCi'
has_one :packagist_service, class_name: 'Integrations::Packagist'
has_one :pipelines_email_service, class_name: 'Integrations::PipelinesEmail'
has_one :pivotaltracker_service, class_name: 'Integrations::Pivotaltracker'
has_one :pushover_service, class_name: 'Integrations::Pushover'
has_one :packagist_integration, class_name: 'Integrations::Packagist'
has_one :pipelines_email_integration, class_name: 'Integrations::PipelinesEmail'
has_one :pivotaltracker_integration, class_name: 'Integrations::Pivotaltracker'
has_one :pushover_integration, class_name: 'Integrations::Pushover'
has_one :redmine_service, class_name: 'Integrations::Redmine'
has_one :slack_service, class_name: 'Integrations::Slack'
has_one :slack_slash_commands_service, class_name: 'Integrations::SlackSlashCommands'
......
......@@ -173,7 +173,7 @@ FactoryBot.define do
type { 'SlackSlashCommandsService' }
end
factory :pipelines_email_service, class: 'Integrations::PipelinesEmail' do
factory :pipelines_email_integration, class: 'Integrations::PipelinesEmail' do
project
active { true }
type { 'PipelinesEmailService' }
......
......@@ -367,12 +367,12 @@ project:
- discord_integration
- drone_ci_integration
- emails_on_push_integration
- pipelines_email_service
- pipelines_email_integration
- mattermost_slash_commands_service
- slack_slash_commands_service
- irker_integration
- packagist_service
- pivotaltracker_service
- packagist_integration
- pivotaltracker_integration
- prometheus_service
- flowdock_integration
- assembla_integration
......@@ -385,7 +385,7 @@ project:
- buildkite_integration
- bamboo_integration
- teamcity_service
- pushover_service
- pushover_integration
- jira_service
- redmine_service
- youtrack_service
......
......@@ -2854,7 +2854,7 @@ RSpec.describe Ci::Pipeline, :mailer, factory_default: :keep do
end
it 'builds hook data once' do
create(:pipelines_email_service)
create(:pipelines_email_integration)
expect(Gitlab::DataBuilder::Pipeline).to receive(:build).once.and_call_original
......
......@@ -33,14 +33,14 @@ RSpec.describe Integrations::Packagist do
let(:user) { create(:user) }
let(:project) { create(:project, :repository) }
let(:push_sample_data) { Gitlab::DataBuilder::Push.build_sample(project, user) }
let(:packagist_service) { described_class.create!(packagist_params) }
let(:packagist_integration) { described_class.create!(packagist_params) }
before do
stub_request(:post, packagist_hook_url)
end
it 'calls Packagist API' do
packagist_service.execute(push_sample_data)
packagist_integration.execute(push_sample_data)
expect(a_request(:post, packagist_hook_url)).to have_been_made.once
end
......
......@@ -41,8 +41,8 @@ RSpec.describe Project, factory_default: :keep do
it { is_expected.to have_one(:hangouts_chat_integration) }
it { is_expected.to have_one(:unify_circuit_service) }
it { is_expected.to have_one(:webex_teams_service) }
it { is_expected.to have_one(:packagist_service) }
it { is_expected.to have_one(:pushover_service) }
it { is_expected.to have_one(:packagist_integration) }
it { is_expected.to have_one(:pushover_integration) }
it { is_expected.to have_one(:asana_integration) }
it { is_expected.to have_many(:boards) }
it { is_expected.to have_one(:campfire_integration) }
......@@ -50,9 +50,9 @@ RSpec.describe Project, factory_default: :keep do
it { is_expected.to have_one(:discord_integration) }
it { is_expected.to have_one(:drone_ci_integration) }
it { is_expected.to have_one(:emails_on_push_integration) }
it { is_expected.to have_one(:pipelines_email_service) }
it { is_expected.to have_one(:pipelines_email_integration) }
it { is_expected.to have_one(:irker_integration) }
it { is_expected.to have_one(:pivotaltracker_service) }
it { is_expected.to have_one(:pivotaltracker_integration) }
it { is_expected.to have_one(:flowdock_integration) }
it { is_expected.to have_one(:assembla_integration) }
it { is_expected.to have_one(:slack_slash_commands_service) }
......
......@@ -23,8 +23,8 @@ RSpec.describe Integrations::Test::ProjectService do
expect(subject).to eq(success_result)
end
context 'PipelinesEmailService' do
let(:integration) { create(:pipelines_email_service, project: project) }
context 'with Integrations::PipelinesEmail' do
let(:integration) { create(:pipelines_email_integration, project: project) }
it_behaves_like 'tests for integration with pipeline data'
end
......
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