Commit 1a85ce88 authored by Rémy Coutable's avatar Rémy Coutable

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

Fix EmptyLineAfterFinalLetItBe offenses in spec/lib/gitlab/ci

See merge request gitlab-org/gitlab!58249
parents a95f72f6 f65a6475
...@@ -655,25 +655,6 @@ RSpec/EmptyLineAfterFinalLetItBe: ...@@ -655,25 +655,6 @@ RSpec/EmptyLineAfterFinalLetItBe:
- spec/lib/extracts_path_spec.rb - spec/lib/extracts_path_spec.rb
- spec/lib/extracts_ref_spec.rb - spec/lib/extracts_ref_spec.rb
- spec/lib/gitlab/cache/ci/project_pipeline_status_spec.rb - spec/lib/gitlab/cache/ci/project_pipeline_status_spec.rb
- spec/lib/gitlab/ci/build/policy/changes_spec.rb
- spec/lib/gitlab/ci/config/external/file/local_spec.rb
- spec/lib/gitlab/ci/config/external/file/project_spec.rb
- spec/lib/gitlab/ci/config/external/file/template_spec.rb
- spec/lib/gitlab/ci/config/external/mapper_spec.rb
- spec/lib/gitlab/ci/config/external/processor_spec.rb
- spec/lib/gitlab/ci/pipeline/chain/build_spec.rb
- spec/lib/gitlab/ci/pipeline/chain/cancel_pending_pipelines_spec.rb
- spec/lib/gitlab/ci/pipeline/chain/template_usage_spec.rb
- spec/lib/gitlab/ci/pipeline/chain/validate/external_spec.rb
- spec/lib/gitlab/ci/pipeline/chain/validate/repository_spec.rb
- spec/lib/gitlab/ci/pipeline/seed/build_spec.rb
- spec/lib/gitlab/ci/pipeline/seed/deployment_spec.rb
- spec/lib/gitlab/ci/pipeline/seed/environment_spec.rb
- spec/lib/gitlab/ci/pipeline/seed/processable/resource_group_spec.rb
- spec/lib/gitlab/ci/reports/test_failure_history_spec.rb
- spec/lib/gitlab/ci/syntax_templates_spec.rb
- spec/lib/gitlab/ci/trace/chunked_io_spec.rb
- spec/lib/gitlab/ci/trace_spec.rb
- spec/lib/gitlab/closing_issue_extractor_spec.rb - spec/lib/gitlab/closing_issue_extractor_spec.rb
- spec/lib/gitlab/composer/cache_spec.rb - spec/lib/gitlab/composer/cache_spec.rb
- spec/lib/gitlab/data_builder/wiki_page_spec.rb - spec/lib/gitlab/data_builder/wiki_page_spec.rb
......
---
title: Fix EmptyLineAfterFinalLetItBe offenses in spec/lib/gitlab/ci
merge_request: 58249
author: Huzaifa Iftikhar @huzaifaiftikhar
type: fixed
...@@ -120,6 +120,7 @@ RSpec.describe Gitlab::Ci::Build::Policy::Changes do ...@@ -120,6 +120,7 @@ RSpec.describe Gitlab::Ci::Build::Policy::Changes do
context 'when branch is created' do context 'when branch is created' do
let_it_be(:project) { create(:project, :repository) } let_it_be(:project) { create(:project, :repository) }
let(:pipeline) do let(:pipeline) do
create(:ci_empty_pipeline, project: project, create(:ci_empty_pipeline, project: project,
ref: 'feature', ref: 'feature',
......
...@@ -5,6 +5,7 @@ require 'spec_helper' ...@@ -5,6 +5,7 @@ require 'spec_helper'
RSpec.describe Gitlab::Ci::Config::External::File::Local do RSpec.describe Gitlab::Ci::Config::External::File::Local do
let_it_be(:project) { create(:project, :repository) } let_it_be(:project) { create(:project, :repository) }
let_it_be(:user) { create(:user) } let_it_be(:user) { create(:user) }
let(:sha) { '12345' } let(:sha) { '12345' }
let(:context) { Gitlab::Ci::Config::External::Context.new(**context_params) } let(:context) { Gitlab::Ci::Config::External::Context.new(**context_params) }
let(:params) { { local: location } } let(:params) { { local: location } }
......
...@@ -6,6 +6,7 @@ RSpec.describe Gitlab::Ci::Config::External::File::Project do ...@@ -6,6 +6,7 @@ RSpec.describe Gitlab::Ci::Config::External::File::Project do
let_it_be(:context_project) { create(:project) } let_it_be(:context_project) { create(:project) }
let_it_be(:project) { create(:project, :repository) } let_it_be(:project) { create(:project, :repository) }
let_it_be(:user) { create(:user) } let_it_be(:user) { create(:user) }
let(:context_user) { user } let(:context_user) { user }
let(:parent_pipeline) { double(:parent_pipeline) } let(:parent_pipeline) { double(:parent_pipeline) }
let(:context) { Gitlab::Ci::Config::External::Context.new(**context_params) } let(:context) { Gitlab::Ci::Config::External::Context.new(**context_params) }
......
...@@ -5,6 +5,7 @@ require 'spec_helper' ...@@ -5,6 +5,7 @@ require 'spec_helper'
RSpec.describe Gitlab::Ci::Config::External::File::Template do RSpec.describe Gitlab::Ci::Config::External::File::Template do
let_it_be(:project) { create(:project) } let_it_be(:project) { create(:project) }
let_it_be(:user) { create(:user) } let_it_be(:user) { create(:user) }
let(:context_params) { { project: project, sha: '12345', user: user } } let(:context_params) { { project: project, sha: '12345', user: user } }
let(:context) { Gitlab::Ci::Config::External::Context.new(**context_params) } let(:context) { Gitlab::Ci::Config::External::Context.new(**context_params) }
let(:template) { 'Auto-DevOps.gitlab-ci.yml' } let(:template) { 'Auto-DevOps.gitlab-ci.yml' }
......
...@@ -7,6 +7,7 @@ RSpec.describe Gitlab::Ci::Config::External::Mapper do ...@@ -7,6 +7,7 @@ RSpec.describe Gitlab::Ci::Config::External::Mapper do
let_it_be(:project) { create(:project, :repository) } let_it_be(:project) { create(:project, :repository) }
let_it_be(:user) { create(:user) } let_it_be(:user) { create(:user) }
let(:local_file) { '/lib/gitlab/ci/templates/non-existent-file.yml' } let(:local_file) { '/lib/gitlab/ci/templates/non-existent-file.yml' }
let(:remote_url) { 'https://gitlab.com/gitlab-org/gitlab-foss/blob/1234/.gitlab-ci-1.yml' } let(:remote_url) { 'https://gitlab.com/gitlab-org/gitlab-foss/blob/1234/.gitlab-ci-1.yml' }
let(:template_file) { 'Auto-DevOps.gitlab-ci.yml' } let(:template_file) { 'Auto-DevOps.gitlab-ci.yml' }
......
...@@ -8,6 +8,7 @@ RSpec.describe Gitlab::Ci::Config::External::Processor do ...@@ -8,6 +8,7 @@ RSpec.describe Gitlab::Ci::Config::External::Processor do
let_it_be(:project) { create(:project, :repository) } let_it_be(:project) { create(:project, :repository) }
let_it_be(:another_project) { create(:project, :repository) } let_it_be(:another_project) { create(:project, :repository) }
let_it_be(:user) { create(:user) } let_it_be(:user) { create(:user) }
let(:sha) { '12345' } let(:sha) { '12345' }
let(:context_params) { { project: project, sha: sha, user: user } } let(:context_params) { { project: project, sha: sha, user: user } }
let(:context) { Gitlab::Ci::Config::External::Context.new(**context_params) } let(:context) { Gitlab::Ci::Config::External::Context.new(**context_params) }
......
...@@ -5,6 +5,7 @@ require 'spec_helper' ...@@ -5,6 +5,7 @@ require 'spec_helper'
RSpec.describe Gitlab::Ci::Pipeline::Chain::Build do RSpec.describe Gitlab::Ci::Pipeline::Chain::Build do
let_it_be(:project, reload: true) { create(:project, :repository) } let_it_be(:project, reload: true) { create(:project, :repository) }
let_it_be(:user) { create(:user, developer_projects: [project]) } let_it_be(:user) { create(:user, developer_projects: [project]) }
let(:pipeline) { Ci::Pipeline.new } let(:pipeline) { Ci::Pipeline.new }
let(:variables_attributes) do let(:variables_attributes) do
......
...@@ -5,6 +5,7 @@ require 'spec_helper' ...@@ -5,6 +5,7 @@ require 'spec_helper'
RSpec.describe Gitlab::Ci::Pipeline::Chain::CancelPendingPipelines do RSpec.describe Gitlab::Ci::Pipeline::Chain::CancelPendingPipelines do
let_it_be(:project) { create(:project) } let_it_be(:project) { create(:project) }
let_it_be(:user) { create(:user) } let_it_be(:user) { create(:user) }
let(:prev_pipeline) { create(:ci_pipeline, project: project) } let(:prev_pipeline) { create(:ci_pipeline, project: project) }
let(:new_commit) { create(:commit, project: project) } let(:new_commit) { create(:commit, project: project) }
let(:pipeline) { create(:ci_pipeline, project: project, sha: new_commit.sha) } let(:pipeline) { create(:ci_pipeline, project: project, sha: new_commit.sha) }
......
...@@ -5,6 +5,7 @@ require 'spec_helper' ...@@ -5,6 +5,7 @@ require 'spec_helper'
RSpec.describe Gitlab::Ci::Pipeline::Chain::TemplateUsage do RSpec.describe Gitlab::Ci::Pipeline::Chain::TemplateUsage do
let_it_be(:project) { create(:project) } let_it_be(:project) { create(:project) }
let_it_be(:user) { create(:user) } let_it_be(:user) { create(:user) }
let(:pipeline) { create(:ci_pipeline, project: project) } let(:pipeline) { create(:ci_pipeline, project: project) }
let(:command) do let(:command) do
......
...@@ -5,6 +5,7 @@ require 'spec_helper' ...@@ -5,6 +5,7 @@ require 'spec_helper'
RSpec.describe Gitlab::Ci::Pipeline::Chain::Validate::External do RSpec.describe Gitlab::Ci::Pipeline::Chain::Validate::External do
let_it_be(:project) { create(:project) } let_it_be(:project) { create(:project) }
let_it_be(:user) { create(:user) } let_it_be(:user) { create(:user) }
let(:pipeline) { build(:ci_empty_pipeline, user: user, project: project) } let(:pipeline) { build(:ci_empty_pipeline, user: user, project: project) }
let!(:step) { described_class.new(pipeline, command) } let!(:step) { described_class.new(pipeline, command) }
......
...@@ -5,6 +5,7 @@ require 'spec_helper' ...@@ -5,6 +5,7 @@ require 'spec_helper'
RSpec.describe Gitlab::Ci::Pipeline::Chain::Validate::Repository do RSpec.describe Gitlab::Ci::Pipeline::Chain::Validate::Repository do
let_it_be(:project) { create(:project, :repository) } let_it_be(:project) { create(:project, :repository) }
let_it_be(:user) { create(:user) } let_it_be(:user) { create(:user) }
let(:pipeline) { build_stubbed(:ci_pipeline) } let(:pipeline) { build_stubbed(:ci_pipeline) }
let!(:step) { described_class.new(pipeline, command) } let!(:step) { described_class.new(pipeline, command) }
......
...@@ -5,6 +5,7 @@ require 'spec_helper' ...@@ -5,6 +5,7 @@ require 'spec_helper'
RSpec.describe Gitlab::Ci::Pipeline::Seed::Build do RSpec.describe Gitlab::Ci::Pipeline::Seed::Build do
let_it_be(:project) { create(:project, :repository) } let_it_be(:project) { create(:project, :repository) }
let_it_be(:head_sha) { project.repository.head_commit.id } let_it_be(:head_sha) { project.repository.head_commit.id }
let(:pipeline) { build(:ci_empty_pipeline, project: project, sha: head_sha) } let(:pipeline) { build(:ci_empty_pipeline, project: project, sha: head_sha) }
let(:root_variables) { [] } let(:root_variables) { [] }
let(:seed_context) { double(pipeline: pipeline, root_variables: root_variables) } let(:seed_context) { double(pipeline: pipeline, root_variables: root_variables) }
......
...@@ -4,6 +4,7 @@ require 'spec_helper' ...@@ -4,6 +4,7 @@ require 'spec_helper'
RSpec.describe Gitlab::Ci::Pipeline::Seed::Deployment do RSpec.describe Gitlab::Ci::Pipeline::Seed::Deployment do
let_it_be(:project, refind: true) { create(:project, :repository) } let_it_be(:project, refind: true) { create(:project, :repository) }
let(:pipeline) do let(:pipeline) do
create(:ci_pipeline, project: project, create(:ci_pipeline, project: project,
sha: 'b83d6e391c22777fca1ed3012fce84f633d7fed0') sha: 'b83d6e391c22777fca1ed3012fce84f633d7fed0')
......
...@@ -4,6 +4,7 @@ require 'spec_helper' ...@@ -4,6 +4,7 @@ require 'spec_helper'
RSpec.describe Gitlab::Ci::Pipeline::Seed::Environment do RSpec.describe Gitlab::Ci::Pipeline::Seed::Environment do
let_it_be(:project) { create(:project) } let_it_be(:project) { create(:project) }
let(:job) { build(:ci_build, project: project) } let(:job) { build(:ci_build, project: project) }
let(:seed) { described_class.new(job) } let(:seed) { described_class.new(job) }
let(:attributes) { {} } let(:attributes) { {} }
......
...@@ -4,6 +4,7 @@ require 'spec_helper' ...@@ -4,6 +4,7 @@ require 'spec_helper'
RSpec.describe Gitlab::Ci::Pipeline::Seed::Processable::ResourceGroup do RSpec.describe Gitlab::Ci::Pipeline::Seed::Processable::ResourceGroup do
let_it_be(:project) { create(:project) } let_it_be(:project) { create(:project) }
let(:job) { build(:ci_build, project: project) } let(:job) { build(:ci_build, project: project) }
let(:seed) { described_class.new(job, resource_group_key) } let(:seed) { described_class.new(job, resource_group_key) }
......
...@@ -7,6 +7,7 @@ RSpec.describe Gitlab::Ci::Reports::TestFailureHistory, :aggregate_failures do ...@@ -7,6 +7,7 @@ RSpec.describe Gitlab::Ci::Reports::TestFailureHistory, :aggregate_failures do
describe '#load!' do describe '#load!' do
let_it_be(:project) { create(:project) } let_it_be(:project) { create(:project) }
let(:failed_rspec) { create_test_case_rspec_failed } let(:failed_rspec) { create_test_case_rspec_failed }
let(:failed_java) { create_test_case_java_failed } let(:failed_java) { create_test_case_java_failed }
......
...@@ -5,6 +5,7 @@ require 'spec_helper' ...@@ -5,6 +5,7 @@ require 'spec_helper'
RSpec.describe 'ci/syntax_templates' do RSpec.describe 'ci/syntax_templates' do
let_it_be(:project) { create(:project, :repository) } let_it_be(:project) { create(:project, :repository) }
let_it_be(:user) { create(:user) } let_it_be(:user) { create(:user) }
let(:lint) { Gitlab::Ci::Lint.new(project: project, current_user: user) } let(:lint) { Gitlab::Ci::Lint.new(project: project, current_user: user) }
before do before do
......
...@@ -6,6 +6,7 @@ RSpec.describe Gitlab::Ci::Trace::ChunkedIO, :clean_gitlab_redis_cache do ...@@ -6,6 +6,7 @@ RSpec.describe Gitlab::Ci::Trace::ChunkedIO, :clean_gitlab_redis_cache do
include ChunkedIOHelpers include ChunkedIOHelpers
let_it_be(:build) { create(:ci_build, :running) } let_it_be(:build) { create(:ci_build, :running) }
let(:chunked_io) { described_class.new(build) } let(:chunked_io) { described_class.new(build) }
before do before do
......
...@@ -5,6 +5,7 @@ require 'spec_helper' ...@@ -5,6 +5,7 @@ require 'spec_helper'
RSpec.describe Gitlab::Ci::Trace, :clean_gitlab_redis_shared_state, factory_default: :keep do RSpec.describe Gitlab::Ci::Trace, :clean_gitlab_redis_shared_state, factory_default: :keep do
let_it_be(:project) { create_default(:project).freeze } let_it_be(:project) { create_default(:project).freeze }
let_it_be_with_reload(:build) { create(:ci_build, :success) } let_it_be_with_reload(:build) { create(:ci_build, :success) }
let(:trace) { described_class.new(build) } let(:trace) { described_class.new(build) }
describe "associations" do describe "associations" 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