summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2017-07-17 13:10:07 +0200
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2017-07-17 13:10:32 +0200
commita4d301eed047afb800b810432680b8c9134fa40a (patch)
treed866ff73a33d65b279a76073578c06ee7a210027
parent7fde7012c9126172097fae57969f1694f7cf5f05 (diff)
downloadgitlab-ce-a4d301eed047afb800b810432680b8c9134fa40a.tar.gz
Add specs seeding jobs with auto-retries configured
-rw-r--r--spec/services/ci/create_pipeline_service_spec.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/spec/services/ci/create_pipeline_service_spec.rb b/spec/services/ci/create_pipeline_service_spec.rb
index 77c07b71c68..69f52b06980 100644
--- a/spec/services/ci/create_pipeline_service_spec.rb
+++ b/spec/services/ci/create_pipeline_service_spec.rb
@@ -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: 3 })
+ 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 3
+ end
+ end
end
end