diff options
author | Phil Hughes <me@iamphill.com> | 2017-07-24 14:36:31 +0100 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2017-07-24 14:36:31 +0100 |
commit | 4d2be5bbec25d60a8d478bda5bc83159f2c845b1 (patch) | |
tree | c3c28a833ccd2a6628d928acee44e62ccfcc6fd8 /spec/services/ci/create_pipeline_service_spec.rb | |
parent | 1a2d180e3dfd8bdad94766a2e8b1195288c2b146 (diff) | |
parent | d4c4dec80dc3abd39116440a3c291c19b27258e1 (diff) | |
download | gitlab-ce-4d2be5bbec25d60a8d478bda5bc83159f2c845b1.tar.gz |
Merge branch 'master' into sidebar-fly-out-sub-nav
Diffstat (limited to 'spec/services/ci/create_pipeline_service_spec.rb')
-rw-r--r-- | spec/services/ci/create_pipeline_service_spec.rb | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/spec/services/ci/create_pipeline_service_spec.rb b/spec/services/ci/create_pipeline_service_spec.rb index 77c07b71c68..ba07c01d43f 100644 --- a/spec/services/ci/create_pipeline_service_spec.rb +++ b/spec/services/ci/create_pipeline_service_spec.rb @@ -40,7 +40,7 @@ describe Ci::CreatePipelineService, :services do it 'increments the prometheus counter' do expect(Gitlab::Metrics).to receive(:counter) - .with(:pipelines_created_count, "Pipelines created count") + .with(:pipelines_created_total, "Counter of pipelines created") .and_call_original pipeline @@ -320,5 +320,19 @@ describe Ci::CreatePipelineService, :services do end.not_to change { Environment.count } end end + + context 'when builds with auto-retries are configured' do + before do + config = YAML.dump(rspec: { script: 'rspec', retry: 2 }) + stub_ci_pipeline_yaml_file(config) + end + + it 'correctly creates builds with auto-retry value configured' do + pipeline = execute_service + + expect(pipeline).to be_persisted + expect(pipeline.builds.find_by(name: 'rspec').retries_max).to eq 2 + end + end end end |