diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2017-07-20 07:43:15 +0200 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2017-07-20 07:43:15 +0200 |
commit | d382ed5eb618b5719f4fbf705a47b00c98e7c5a6 (patch) | |
tree | b306966ccbab9e0088f43b4ccc35141c72ae2775 | |
parent | 23223ba64e91cc3406ed6cf5889f8cc25f9a1337 (diff) | |
download | gitlab-ce-feature/gb/auto-retry-failed-ci-job.tar.gz |
Fix CI/CD job auto-retry specsfeature/gb/auto-retry-failed-ci-job
-rw-r--r-- | spec/lib/ci/gitlab_ci_yaml_processor_spec.rb | 4 | ||||
-rw-r--r-- | spec/services/ci/create_pipeline_service_spec.rb | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/spec/lib/ci/gitlab_ci_yaml_processor_spec.rb b/spec/lib/ci/gitlab_ci_yaml_processor_spec.rb index e50f799a6e9..ed571a2ba05 100644 --- a/spec/lib/ci/gitlab_ci_yaml_processor_spec.rb +++ b/spec/lib/ci/gitlab_ci_yaml_processor_spec.rb @@ -35,11 +35,11 @@ module Ci describe 'retry entry' do context 'when retry count is specified' do let(:config) do - YAML.dump(rspec: { script: 'rspec', retry: 3 }) + YAML.dump(rspec: { script: 'rspec', retry: 1 }) end it 'includes retry count in build options attribute' do - expect(subject[:options]).to include(retry: 3) + expect(subject[:options]).to include(retry: 1) end end diff --git a/spec/services/ci/create_pipeline_service_spec.rb b/spec/services/ci/create_pipeline_service_spec.rb index 69f52b06980..194332f62c6 100644 --- a/spec/services/ci/create_pipeline_service_spec.rb +++ b/spec/services/ci/create_pipeline_service_spec.rb @@ -323,7 +323,7 @@ describe Ci::CreatePipelineService, :services do context 'when builds with auto-retries are configured' do before do - config = YAML.dump(rspec: { script: 'rspec', retry: 3 }) + config = YAML.dump(rspec: { script: 'rspec', retry: 2 }) stub_ci_pipeline_yaml_file(config) end @@ -331,7 +331,7 @@ describe Ci::CreatePipelineService, :services do pipeline = execute_service expect(pipeline).to be_persisted - expect(pipeline.builds.find_by(name: 'rspec').retries_max).to eq 3 + expect(pipeline.builds.find_by(name: 'rspec').retries_max).to eq 2 end end end |