Commit b443dc6c authored by Bob Van Landuyt's avatar Bob Van Landuyt

Merge branch 'ci-quota-check-builds-clean-up' into 'master'

Remove unused code for `no_matching_runner` failure reason

See merge request gitlab-org/gitlab!64002
parents 1d6ea3d8 f96404e8
......@@ -361,10 +361,6 @@ module EE
super && !ci_minutes_quota.minutes_used_up?
end
def shared_runners_enabled_but_unavailable?
shared_runners_enabled? && !shared_runners_available?
end
def link_pool_repository
super
repository.log_geo_updated_event
......
......@@ -8,7 +8,6 @@ RSpec.describe 'Two merge requests on a merge train' do
let(:project) { create(:project, :repository) }
let_it_be(:maintainer_1) { create(:user) }
let_it_be(:maintainer_2) { create(:user) }
let_it_be(:runner) { create(:ci_runner, :online) }
let(:merge_request_1) do
create(:merge_request,
......
......@@ -64,8 +64,6 @@ RSpec.describe 'User adds a merge request to a merge train', :js do
end
context 'when pipeline for merge train succeeds', :sidekiq_might_not_need_inline do
let_it_be(:runner) { create(:ci_runner, :online) }
before do
visit project_merge_request_path(project, merge_request)
merge_request.merge_train.pipeline.builds.map(&:success!)
......
......@@ -2863,30 +2863,4 @@ RSpec.describe Project do
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
......@@ -75,7 +75,6 @@ RSpec.describe Ci::CreatePipelineService do
end
it 'creates a pipeline with regular_job and bridge_dag_job pending' do
create(:ci_runner, :online)
pipeline = create_pipeline!
processables = pipeline.processables
Ci::InitialPipelineProcessWorker.new.perform(pipeline.id)
......
......@@ -25,8 +25,6 @@ RSpec.describe 'Merge request > User sees pipelines triggered by merge request',
}
end
let_it_be(:runner) { create(:ci_runner, :online) }
before do
stub_application_setting(auto_devops_enabled: false)
stub_ci_pipeline_yaml_file(YAML.dump(config))
......
......@@ -53,8 +53,6 @@ RSpec.describe Ci::CreatePipelineService, '#execute' do
end
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
pipeline = create_pipeline!
......
......@@ -7,7 +7,6 @@ RSpec.describe Ci::CreatePipelineService do
let_it_be(:project, reload: true) { create(:project, :repository) }
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' }
......
......@@ -859,8 +859,6 @@ RSpec.shared_examples 'Pipeline Processing Service' do
end
context 'when a bridge job has parallel:matrix config', :sidekiq_inline do
let_it_be(:runner) { create(:ci_runner, :online) }
let(:parent_config) do
<<-EOY
test:
......
......@@ -3,7 +3,6 @@
RSpec.shared_context 'Pipeline Processing Service Tests With Yaml' do
let_it_be(:project) { create(:project, :repository) }
let_it_be(:user) { project.owner }
let_it_be(:runner) { create(:ci_runner, :online) }
where(:test_file_path) do
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