Fix specs api/runners_spec.rb, api/v3/runners_spec.rb update_build_queue_service_spec.rb
This commit is contained in:
parent
bbd4cd118f
commit
d9251f2ea0
2 changed files with 4 additions and 1 deletions
|
@ -13,7 +13,7 @@ describe API::Runners do
|
||||||
|
|
||||||
let!(:shared_runner) { create(:ci_runner, :instance, description: 'Shared runner') }
|
let!(:shared_runner) { create(:ci_runner, :instance, description: 'Shared runner') }
|
||||||
let!(:project_runner) { create(:ci_runner, :project, description: 'Project runner', projects: [project]) }
|
let!(:project_runner) { create(:ci_runner, :project, description: 'Project runner', projects: [project]) }
|
||||||
let!(:two_projects_runner) { create(:ci_runner, :project, description: 'Two projects runner', projects: [project, project2])
|
let!(:two_projects_runner) { create(:ci_runner, :project, description: 'Two projects runner', projects: [project, project2]) }
|
||||||
let!(:group_runner) { create(:ci_runner, :group, description: 'Group runner', groups: [group]) }
|
let!(:group_runner) { create(:ci_runner, :group, description: 'Group runner', groups: [group]) }
|
||||||
|
|
||||||
before do
|
before do
|
||||||
|
|
|
@ -15,6 +15,9 @@ describe Ci::UpdateBuildQueueService do
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'when there is no runner that can pick build' do
|
context 'when there is no runner that can pick build' do
|
||||||
|
let(:another_project) { create(:project) }
|
||||||
|
let(:runner) { create(:ci_runner, :project, projects: [another_project]) }
|
||||||
|
|
||||||
it 'does not tick runner queue value' do
|
it 'does not tick runner queue value' do
|
||||||
expect { subject.execute(build) }.not_to change { runner.ensure_runner_queue_value }
|
expect { subject.execute(build) }.not_to change { runner.ensure_runner_queue_value }
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue