diff options
author | Kamil TrzciĆski <ayufan@ayufan.eu> | 2017-12-14 11:53:15 +0000 |
---|---|---|
committer | Tiago <tiagonbotelho@hotmail.com> | 2017-12-14 12:16:50 +0000 |
commit | 10cfd86a8872c878cd93d76f4f523d7b11e9563e (patch) | |
tree | 9fe5812c3f92d0b4bb8dc1c22fbd186937e37562 /spec/services/ci/register_job_service_spec.rb | |
parent | c425722d74ed44b6e5e71af038acc81954b00d5a (diff) | |
download | gitlab-ce-10cfd86a8872c878cd93d76f4f523d7b11e9563e.tar.gz |
Merge branch '41110-dependencies-validator-fails-when-depended-job-is-manual' into 'master'
Dependencies Validator fails when depended job is `manual`
Closes #41110
See merge request gitlab-org/gitlab-ce!15924
(cherry picked from commit 57175ecb5060dac145abc048b6e88642bc1aa82b)
1def948b Dependencies Validator fails when depended job is `manual`
Diffstat (limited to 'spec/services/ci/register_job_service_spec.rb')
-rw-r--r-- | spec/services/ci/register_job_service_spec.rb | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/spec/services/ci/register_job_service_spec.rb b/spec/services/ci/register_job_service_spec.rb index 22fb7ed7215..de8a9ce12ff 100644 --- a/spec/services/ci/register_job_service_spec.rb +++ b/spec/services/ci/register_job_service_spec.rb @@ -287,9 +287,9 @@ module Ci shared_examples 'validation is active' do context 'when depended job has not been completed yet' do - let!(:pre_stage_job) { create(:ci_build, :running, pipeline: pipeline, name: 'test', stage_idx: 0) } + let!(:pre_stage_job) { create(:ci_build, :manual, pipeline: pipeline, name: 'test', stage_idx: 0) } - it_behaves_like 'not pick' + it { expect(subject).to eq(pending_job) } end context 'when artifacts of depended job has been expired' do @@ -309,7 +309,7 @@ module Ci end context 'when job object is staled' do - let!(:pre_stage_job) { create(:ci_build, :running, pipeline: pipeline, name: 'test', stage_idx: 0) } + let!(:pre_stage_job) { create(:ci_build, :success, :expired, pipeline: pipeline, name: 'test', stage_idx: 0) } before do allow_any_instance_of(Ci::Build).to receive(:drop!) @@ -324,11 +324,10 @@ module Ci shared_examples 'validation is not active' do context 'when depended job has not been completed yet' do - let!(:pre_stage_job) { create(:ci_build, :running, pipeline: pipeline, name: 'test', stage_idx: 0) } + let!(:pre_stage_job) { create(:ci_build, :manual, pipeline: pipeline, name: 'test', stage_idx: 0) } it { expect(subject).to eq(pending_job) } end - context 'when artifacts of depended job has been expired' do let!(:pre_stage_job) { create(:ci_build, :success, :expired, pipeline: pipeline, name: 'test', stage_idx: 0) } |