Commit f96404e8 authored by Marius Bobin's avatar Marius Bobin

Remove unused code

Remove unused code
parent f3841248
...@@ -361,10 +361,6 @@ module EE ...@@ -361,10 +361,6 @@ module EE
super && !ci_minutes_quota.minutes_used_up? super && !ci_minutes_quota.minutes_used_up?
end end
def shared_runners_enabled_but_unavailable?
shared_runners_enabled? && !shared_runners_available?
end
def link_pool_repository def link_pool_repository
super super
repository.log_geo_updated_event repository.log_geo_updated_event
......
...@@ -8,7 +8,6 @@ RSpec.describe 'Two merge requests on a merge train' do ...@@ -8,7 +8,6 @@ RSpec.describe 'Two merge requests on a merge train' do
let(:project) { create(:project, :repository) } let(:project) { create(:project, :repository) }
let_it_be(:maintainer_1) { create(:user) } let_it_be(:maintainer_1) { create(:user) }
let_it_be(:maintainer_2) { create(:user) } let_it_be(:maintainer_2) { create(:user) }
let_it_be(:runner) { create(:ci_runner, :online) }
let(:merge_request_1) do let(:merge_request_1) do
create(:merge_request, create(:merge_request,
......
...@@ -64,8 +64,6 @@ RSpec.describe 'User adds a merge request to a merge train', :js do ...@@ -64,8 +64,6 @@ RSpec.describe 'User adds a merge request to a merge train', :js do
end end
context 'when pipeline for merge train succeeds', :sidekiq_might_not_need_inline do context 'when pipeline for merge train succeeds', :sidekiq_might_not_need_inline do
let_it_be(:runner) { create(:ci_runner, :online) }
before do before do
visit project_merge_request_path(project, merge_request) visit project_merge_request_path(project, merge_request)
merge_request.merge_train.pipeline.builds.map(&:success!) merge_request.merge_train.pipeline.builds.map(&:success!)
......
...@@ -2863,30 +2863,4 @@ RSpec.describe Project do ...@@ -2863,30 +2863,4 @@ RSpec.describe Project do
end end
end end
end end
describe '#shared_runners_enabled_but_unavailable?' do
using RSpec::Parameterized::TableSyntax
let(:project) do
build_stubbed(:project, shared_runners_enabled: shared_runners_enabled)
end
before do
allow(project).to receive(:ci_minutes_quota)
.and_return(double('quota', minutes_used_up?: minutes_used_up))
end
where(:shared_runners_enabled, :minutes_used_up, :result) do
true | true | true
true | false | false
false | false | false
false | true | false
end
with_them do
it 'returns the correct value' do
expect(project.shared_runners_enabled_but_unavailable?).to eq(result)
end
end
end
end end
...@@ -75,7 +75,6 @@ RSpec.describe Ci::CreatePipelineService do ...@@ -75,7 +75,6 @@ RSpec.describe Ci::CreatePipelineService do
end end
it 'creates a pipeline with regular_job and bridge_dag_job pending' do it 'creates a pipeline with regular_job and bridge_dag_job pending' do
create(:ci_runner, :online)
pipeline = create_pipeline! pipeline = create_pipeline!
processables = pipeline.processables processables = pipeline.processables
Ci::InitialPipelineProcessWorker.new.perform(pipeline.id) Ci::InitialPipelineProcessWorker.new.perform(pipeline.id)
......
...@@ -25,8 +25,6 @@ RSpec.describe 'Merge request > User sees pipelines triggered by merge request', ...@@ -25,8 +25,6 @@ RSpec.describe 'Merge request > User sees pipelines triggered by merge request',
} }
end end
let_it_be(:runner) { create(:ci_runner, :online) }
before do before do
stub_application_setting(auto_devops_enabled: false) stub_application_setting(auto_devops_enabled: false)
stub_ci_pipeline_yaml_file(YAML.dump(config)) stub_ci_pipeline_yaml_file(YAML.dump(config))
......
...@@ -53,8 +53,6 @@ RSpec.describe Ci::CreatePipelineService, '#execute' do ...@@ -53,8 +53,6 @@ RSpec.describe Ci::CreatePipelineService, '#execute' do
end end
context 'when sidekiq processes the job', :sidekiq_inline do context 'when sidekiq processes the job', :sidekiq_inline do
let_it_be(:runner) { create(:ci_runner, :online) }
it 'transitions to pending status and triggers a downstream pipeline' do it 'transitions to pending status and triggers a downstream pipeline' do
pipeline = create_pipeline! pipeline = create_pipeline!
......
...@@ -7,7 +7,6 @@ RSpec.describe Ci::CreatePipelineService do ...@@ -7,7 +7,6 @@ RSpec.describe Ci::CreatePipelineService do
let_it_be(:project, reload: true) { create(:project, :repository) } let_it_be(:project, reload: true) { create(:project, :repository) }
let_it_be(:user, reload: true) { project.owner } let_it_be(:user, reload: true) { project.owner }
let_it_be(:runner) { create(:ci_runner, :online, tag_list: %w[postgres mysql ruby]) }
let(:ref_name) { 'refs/heads/master' } let(:ref_name) { 'refs/heads/master' }
......
...@@ -859,8 +859,6 @@ RSpec.shared_examples 'Pipeline Processing Service' do ...@@ -859,8 +859,6 @@ RSpec.shared_examples 'Pipeline Processing Service' do
end end
context 'when a bridge job has parallel:matrix config', :sidekiq_inline do context 'when a bridge job has parallel:matrix config', :sidekiq_inline do
let_it_be(:runner) { create(:ci_runner, :online) }
let(:parent_config) do let(:parent_config) do
<<-EOY <<-EOY
test: test:
......
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
RSpec.shared_context 'Pipeline Processing Service Tests With Yaml' do RSpec.shared_context 'Pipeline Processing Service Tests With Yaml' do
let_it_be(:project) { create(:project, :repository) } let_it_be(:project) { create(:project, :repository) }
let_it_be(:user) { project.owner } let_it_be(:user) { project.owner }
let_it_be(:runner) { create(:ci_runner, :online) }
where(:test_file_path) do where(:test_file_path) do
Dir.glob(Rails.root.join('spec/services/ci/pipeline_processing/test_cases/*.yml')) Dir.glob(Rails.root.join('spec/services/ci/pipeline_processing/test_cases/*.yml'))
......
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