Commit a95f72f6 authored by Rémy Coutable's avatar Rémy Coutable

Merge branch 'issue#325836-fix-empty-line-after-let-it-be-services-ci' into 'master'

Fix EmptyLineAfterFinalLetItBe offenses in spec/services/ci [RUN AS-IF-FOSS]

See merge request gitlab-org/gitlab!58411
parents 79f88652 b6df9d7a
......@@ -823,28 +823,6 @@ RSpec/EmptyLineAfterFinalLetItBe:
- spec/services/auth/dependency_proxy_authentication_service_spec.rb
- spec/services/auto_merge_service_spec.rb
- spec/services/bulk_create_integration_service_spec.rb
- spec/services/ci/change_variable_service_spec.rb
- spec/services/ci/change_variables_service_spec.rb
- spec/services/ci/create_pipeline_service/cross_project_pipeline_spec.rb
- spec/services/ci/create_pipeline_service/custom_config_content_spec.rb
- spec/services/ci/create_pipeline_service/dry_run_spec.rb
- spec/services/ci/create_pipeline_service/environment_spec.rb
- spec/services/ci/create_pipeline_service/parameter_content_spec.rb
- spec/services/ci/create_pipeline_service/parent_child_pipeline_spec.rb
- spec/services/ci/create_pipeline_service_spec.rb
- spec/services/ci/create_web_ide_terminal_service_spec.rb
- spec/services/ci/expire_pipeline_cache_service_spec.rb
- spec/services/ci/external_pull_requests/create_pipeline_service_spec.rb
- spec/services/ci/find_exposed_artifacts_service_spec.rb
- spec/services/ci/job_artifacts/create_service_spec.rb
- spec/services/ci/parse_dotenv_artifact_service_spec.rb
- spec/services/ci/pipeline_bridge_status_service_spec.rb
- spec/services/ci/pipeline_trigger_service_spec.rb
- spec/services/ci/prometheus_metrics/observe_histograms_service_spec.rb
- spec/services/ci/register_job_service_spec.rb
- spec/services/ci/resource_groups/assign_resource_from_resource_group_service_spec.rb
- spec/services/ci/retry_build_service_spec.rb
- spec/services/ci/stop_environments_service_spec.rb
- spec/services/clusters/applications/prometheus_health_check_service_spec.rb
- spec/services/container_expiration_policy_service_spec.rb
- spec/services/dependency_proxy/find_or_create_manifest_service_spec.rb
......
---
title: Fix EmptyLineAfterFinalLetItBe offenses in spec/services/ci
merge_request: 58411
author: Huzaifa Iftikhar @huzaifaiftikhar
type: fixed
......@@ -6,6 +6,7 @@ RSpec.describe Ci::ChangeVariableService do
let(:service) { described_class.new(container: group, current_user: user, params: params) }
let_it_be(:user) { create(:user) }
let(:group) { create(:group) }
describe '#execute' do
......
......@@ -6,6 +6,7 @@ RSpec.describe Ci::ChangeVariablesService do
let(:service) { described_class.new(container: group, current_user: user, params: params) }
let_it_be(:user) { create(:user) }
let(:group) { spy(:group, variables: []) }
let(:params) { { variables_attributes: [{ key: 'new_variable', value: 'variable_value' }] } }
......
......@@ -4,6 +4,7 @@ require 'spec_helper'
RSpec.describe Ci::CreatePipelineService, '#execute' do
let_it_be(:group) { create(:group, name: 'my-organization') }
let(:upstream_project) { create(:project, :repository, name: 'upstream', group: group) }
let(:downstram_project) { create(:project, :repository, name: 'downstream', group: group) }
let(:user) { create(:user) }
......
......@@ -4,6 +4,7 @@ require 'spec_helper'
RSpec.describe Ci::CreatePipelineService do
let_it_be(:project) { create(:project, :repository) }
let_it_be(:user) { project.owner }
let(:ref) { 'refs/heads/master' }
let(:service) { described_class.new(project, user, { ref: ref }) }
......
......@@ -5,6 +5,7 @@ require 'spec_helper'
RSpec.describe Ci::CreatePipelineService do
let_it_be(:project) { create(:project, :repository) }
let_it_be(:user) { project.owner }
let(:ref) { 'refs/heads/master' }
let(:service) { described_class.new(project, user, { ref: ref }) }
......
......@@ -5,6 +5,7 @@ require 'spec_helper'
RSpec.describe Ci::CreatePipelineService do
let_it_be(:project) { create(:project, :repository) }
let_it_be(:developer) { create(:user) }
let(:service) { described_class.new(project, user, ref: 'master') }
let(:user) { developer }
......
......@@ -5,6 +5,7 @@ require 'spec_helper'
RSpec.describe Ci::CreatePipelineService do
let_it_be(:project) { create(:project, :repository) }
let_it_be(:user) { project.owner }
let(:service) { described_class.new(project, user, { ref: 'refs/heads/master' }) }
let(:content) do
<<~EOY
......
......@@ -5,6 +5,7 @@ require 'spec_helper'
RSpec.describe Ci::CreatePipelineService, '#execute' do
let_it_be(:project) { create(:project, :repository) }
let_it_be(:user) { create(:user) }
let(:ref_name) { 'master' }
let(:service) do
......
......@@ -7,6 +7,7 @@ RSpec.describe Ci::CreatePipelineService do
let_it_be(:project, reload: true) { create(:project, :repository) }
let_it_be(:user, reload: true) { project.owner }
let(:ref_name) { 'refs/heads/master' }
before do
......
......@@ -5,6 +5,7 @@ require 'spec_helper'
RSpec.describe Ci::CreateWebIdeTerminalService do
let_it_be(:project) { create(:project, :repository) }
let_it_be(:user) { create(:user) }
let(:ref) { 'master' }
describe '#execute' do
......
......@@ -6,6 +6,7 @@ RSpec.describe Ci::ExpirePipelineCacheService do
let_it_be(:user) { create(:user) }
let_it_be(:project) { create(:project) }
let_it_be(:pipeline) { create(:ci_pipeline, project: project) }
subject { described_class.new }
describe '#execute' do
......
......@@ -6,6 +6,7 @@ RSpec.describe Ci::ExternalPullRequests::CreatePipelineService do
describe '#execute' do
let_it_be(:project) { create(:project, :auto_devops, :repository) }
let_it_be(:user) { create(:user) }
let(:pull_request) { create(:external_pull_request, project: project) }
before do
......
......@@ -15,6 +15,7 @@ RSpec.describe Ci::FindExposedArtifactsService do
end
let_it_be(:project) { create(:project) }
let(:user) { nil }
after do
......
......@@ -4,6 +4,7 @@ require 'spec_helper'
RSpec.describe Ci::JobArtifacts::CreateService do
let_it_be(:project) { create(:project) }
let(:service) { described_class.new(job) }
let(:job) { create(:ci_build, project: project) }
let(:artifacts_sha256) { '0' * 64 }
......
......@@ -5,6 +5,7 @@ require 'spec_helper'
RSpec.describe Ci::ParseDotenvArtifactService do
let_it_be(:project) { create(:project) }
let_it_be(:pipeline) { create(:ci_pipeline, project: project) }
let(:build) { create(:ci_build, pipeline: pipeline, project: project) }
let(:service) { described_class.new(project, nil) }
......
......@@ -5,6 +5,7 @@ require 'spec_helper'
RSpec.describe Ci::PipelineBridgeStatusService do
let(:user) { build(:user) }
let_it_be(:project) { create(:project) }
let(:pipeline) { build(:ci_pipeline, project: project) }
describe '#execute' do
......
......@@ -13,6 +13,7 @@ RSpec.describe Ci::PipelineTriggerService do
describe '#execute' do
let_it_be(:user) { create(:user) }
let(:result) { described_class.new(project, user, params).execute }
before do
......
......@@ -4,6 +4,7 @@ require 'spec_helper'
RSpec.describe Ci::PrometheusMetrics::ObserveHistogramsService do
let_it_be(:project) { create(:project) }
let(:params) { {} }
subject(:execute) { described_class.new(project, params).execute }
......
......@@ -7,6 +7,7 @@ module Ci
let_it_be(:group) { create(:group) }
let_it_be(:project, reload: true) { create(:project, group: group, shared_runners_enabled: false, group_runners_enabled: false) }
let_it_be(:pipeline) { create(:ci_pipeline, project: project) }
let!(:shared_runner) { create(:ci_runner, :instance) }
let!(:specific_runner) { create(:ci_runner, :project, projects: [project]) }
let!(:group_runner) { create(:ci_runner, :group, groups: [group]) }
......
......@@ -5,6 +5,7 @@ require 'spec_helper'
RSpec.describe Ci::ResourceGroups::AssignResourceFromResourceGroupService do
let_it_be(:project) { create(:project) }
let_it_be(:user) { create(:user) }
let(:service) { described_class.new(project, user) }
describe '#execute' do
......
......@@ -18,6 +18,7 @@ RSpec.describe Ci::RetryBuildService do
end
let_it_be_with_refind(:build) { create(:ci_build, pipeline: pipeline, stage_id: stage.id) }
let(:user) { developer }
let(:service) do
......
......@@ -188,6 +188,7 @@ RSpec.describe Ci::StopEnvironmentsService do
let_it_be(:project) { create(:project, :repository) }
let_it_be(:user) { create(:user) }
let(:environments) { Environment.available }
before_all 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