diff options
author | Kamil TrzciĆski <ayufan@ayufan.eu> | 2018-05-23 13:55:59 +0200 |
---|---|---|
committer | Dylan Griffith <dyl.griffith@gmail.com> | 2018-05-31 10:56:07 +0200 |
commit | 8d5d6ada5ed4630edf618f468565721be842e748 (patch) | |
tree | 7dc7190fbb57d918efad2f44b321d28b966eb014 /spec | |
parent | 051f385e7e82130e6978cd3956e5c48fbdc83b2e (diff) | |
download | gitlab-ce-8d5d6ada5ed4630edf618f468565721be842e748.tar.gz |
Fix weird Rails bug that leads to `runner_id=null` in SQL query
Diffstat (limited to 'spec')
-rw-r--r-- | spec/services/ci/register_job_service_spec.rb | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/spec/services/ci/register_job_service_spec.rb b/spec/services/ci/register_job_service_spec.rb index ab0266ad9b9..35374a09bd9 100644 --- a/spec/services/ci/register_job_service_spec.rb +++ b/spec/services/ci/register_job_service_spec.rb @@ -5,15 +5,11 @@ module Ci set(:group) { create(:group) } set(:project) { create(:project, group: group, shared_runners_enabled: false, group_runners_enabled: false) } set(:pipeline) { create(:ci_pipeline, project: project) } - let!(:shared_runner) { create(:ci_runner, is_shared: true) } - let!(:specific_runner) { create(:ci_runner, is_shared: false) } + 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]) } let!(:pending_job) { create(:ci_build, pipeline: pipeline) } - before do - specific_runner.assign_to(project) - end - describe '#execute' do context 'runner follow tag list' do it "picks build with the same tag" do |