Commit d382ed5e authored by Grzegorz Bizon's avatar Grzegorz Bizon

Fix CI/CD job auto-retry specs

parent 23223ba6
...@@ -35,11 +35,11 @@ module Ci ...@@ -35,11 +35,11 @@ module Ci
describe 'retry entry' do describe 'retry entry' do
context 'when retry count is specified' do context 'when retry count is specified' do
let(:config) do let(:config) do
YAML.dump(rspec: { script: 'rspec', retry: 3 }) YAML.dump(rspec: { script: 'rspec', retry: 1 })
end end
it 'includes retry count in build options attribute' do 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
end end
......
...@@ -323,7 +323,7 @@ describe Ci::CreatePipelineService, :services do ...@@ -323,7 +323,7 @@ describe Ci::CreatePipelineService, :services do
context 'when builds with auto-retries are configured' do context 'when builds with auto-retries are configured' do
before 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) stub_ci_pipeline_yaml_file(config)
end end
...@@ -331,7 +331,7 @@ describe Ci::CreatePipelineService, :services do ...@@ -331,7 +331,7 @@ describe Ci::CreatePipelineService, :services do
pipeline = execute_service pipeline = execute_service
expect(pipeline).to be_persisted 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 end
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment