Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorKamil TrzciƄski <ayufan@ayufan.eu>2017-03-27 14:58:57 +0300
committerDJ Mountney <david@twkie.net>2017-03-28 00:49:44 +0300
commit81b1730d44055af575bc234c151bd2b1708b205d (patch)
tree754c6643720c212be9679287e6a280661b7930e9 /spec
parent87d66fa5a5089eda95a50783413730a9c3c36d62 (diff)
Merge branch 'fix/gb/pipeline-retry-only-latest-jobs' into 'master'
Do not retry jobs multiple times when retrying a pipeline Closes #30092 See merge request !10249
Diffstat (limited to 'spec')
-rw-r--r--spec/services/ci/retry_pipeline_service_spec.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/spec/services/ci/retry_pipeline_service_spec.rb b/spec/services/ci/retry_pipeline_service_spec.rb
index 5445b65f4e8..f1b2d3a4798 100644
--- a/spec/services/ci/retry_pipeline_service_spec.rb
+++ b/spec/services/ci/retry_pipeline_service_spec.rb
@@ -9,6 +9,19 @@ describe Ci::RetryPipelineService, '#execute', :services do
context 'when user has ability to modify pipeline' do
let(:user) { create(:admin) }
+ context 'when there are already retried jobs present' do
+ before do
+ create_build('rspec', :canceled, 0)
+ create_build('rspec', :failed, 0)
+ end
+
+ it 'does not retry jobs that has already been retried' do
+ expect(statuses.first).to be_retried
+ expect { service.execute(pipeline) }
+ .to change { CommitStatus.count }.by(1)
+ end
+ end
+
context 'when there are failed builds in the last stage' do
before do
create_build('rspec 1', :success, 0)