diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-06 21:07:44 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-06 21:07:44 +0300 |
commit | e1867c38fc5a4b931b4b2256d4909182e94f1051 (patch) | |
tree | 3047b637f7f9a31e74c62d3fe054b24c95e3534e /spec/services | |
parent | 63894d59abd34f76f399d755012cdcd32c5b1103 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/services')
-rw-r--r-- | spec/services/ci/retry_pipeline_service_spec.rb | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/spec/services/ci/retry_pipeline_service_spec.rb b/spec/services/ci/retry_pipeline_service_spec.rb index 3cab3158cce..4b949761b8f 100644 --- a/spec/services/ci/retry_pipeline_service_spec.rb +++ b/spec/services/ci/retry_pipeline_service_spec.rb @@ -91,6 +91,25 @@ describe Ci::RetryPipelineService, '#execute' do end end + context 'when there is a failed test in a DAG' do + before do + create_build('build', :success, 0) + create_build('build2', :success, 0) + test_build = create_build('test', :failed, 1) + create(:ci_build_need, build: test_build, name: 'build') + create(:ci_build_need, build: test_build, name: 'build2') + end + + it 'retries the test' do + service.execute(pipeline) + + expect(build('build')).to be_success + expect(build('build2')).to be_success + expect(build('test')).to be_pending + expect(build('test').needs.map(&:name)).to match_array(%w(build build2)) + end + end + context 'when the last stage was skipepd' do before do create_build('build 1', :success, 0) |