Fix CI/CD job auto-retry specs
This commit is contained in:
parent
23223ba64e
commit
d382ed5eb6
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue