diff options
Diffstat (limited to 'spec/services/ci/play_build_service_spec.rb')
-rw-r--r-- | spec/services/ci/play_build_service_spec.rb | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/spec/services/ci/play_build_service_spec.rb b/spec/services/ci/play_build_service_spec.rb index 00c6de7681d..78de91675f9 100644 --- a/spec/services/ci/play_build_service_spec.rb +++ b/spec/services/ci/play_build_service_spec.rb @@ -61,6 +61,28 @@ RSpec.describe Ci::PlayBuildService, '#execute' do expect(build.reload.user).to eq user end + context 'when a subsequent job is skipped' do + let!(:job) { create(:ci_build, :skipped, pipeline: pipeline, stage_idx: build.stage_idx + 1) } + + before do + create(:ci_build_need, build: job, name: build.name) + end + + it 'marks the subsequent job as processable' do + expect { service.execute(build) }.to change { job.reload.status }.from('skipped').to('created') + end + + context 'when the FF ci_fix_pipeline_status_for_dag_needs_manual is disabled' do + before do + stub_feature_flags(ci_fix_pipeline_status_for_dag_needs_manual: false) + end + + it 'does not change the subsequent job' do + expect { service.execute(build) }.not_to change { job.reload.status }.from('skipped') + end + end + end + context 'when variables are supplied' do let(:job_variables) do [{ key: 'first', secret_value: 'first' }, |