Commit 126fbe58 authored by Matija Čupić's avatar Matija Čupić

Return untouched hash if no job is parallelized

parent e7df959b
......@@ -9,14 +9,16 @@ module Gitlab
end
def normalize_jobs
extract_parallelized_jobs
extract_parallelized_jobs!
return @jobs_config if @parallelized_jobs.empty?
parallelized_config = parallelize_jobs
parallelize_dependencies(parallelized_config)
end
private
def extract_parallelized_jobs
def extract_parallelized_jobs!
@parallelized_jobs = {}
@jobs_config.each do |job_name, config|
......
......@@ -31,6 +31,14 @@ describe Gitlab::Ci::Config::Normalizer do
expect(configs).to all(eq(original_config))
end
context 'when the job is not parallelized' do
let(:job_config) { { script: 'rspec', name: 'rspec' } }
it 'returns the same hash' do
is_expected.to eq(config)
end
end
context 'when there is a job with a slash in it' do
let(:job_name) { :"rspec 35/2" }
......
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