diff options
author | Matija Čupić <matteeyah@gmail.com> | 2018-11-06 20:56:06 +0300 |
---|---|---|
committer | Matija Čupić <matteeyah@gmail.com> | 2018-11-06 20:56:06 +0300 |
commit | 7366c319df12900e40dbed679feab146d1092d89 (patch) | |
tree | 29d72c183b3d64b30c56656f5b5537a5b09eb92c | |
parent | 2adfbf1c663e3cf1aa4ec82a90eed12e72c87309 (diff) |
Add additional specs for Normalizer
-rw-r--r-- | spec/lib/gitlab/ci/config/normalizer_spec.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/spec/lib/gitlab/ci/config/normalizer_spec.rb b/spec/lib/gitlab/ci/config/normalizer_spec.rb index 65718d1a432..7c558cacdd5 100644 --- a/spec/lib/gitlab/ci/config/normalizer_spec.rb +++ b/spec/lib/gitlab/ci/config/normalizer_spec.rb @@ -31,6 +31,16 @@ describe Gitlab::Ci::Config::Normalizer do expect(configs).to all(eq(original_config)) end + context 'when there is a job with a slash in it' do + let(:job_name) { :"rspec 35/2" } + + it 'properly parallelizes job names' do + job_names = [:"rspec 35/2 1/5", :"rspec 35/2 2/5", :"rspec 35/2 3/5", :"rspec 35/2 4/5", :"rspec 35/2 5/5"] + + is_expected.to include(*job_names) + end + end + context 'when jobs depend on parallelized jobs' do let(:config) { { job_name => job_config, other_job: { script: 'echo 1', dependencies: [job_name.to_s] } } } @@ -39,6 +49,10 @@ describe Gitlab::Ci::Config::Normalizer do expect(subject[:other_job][:dependencies]).to include(*job_names) end + + it 'does not include original job name in dependencies' do + expect(subject[:other_job][:dependencies]).not_to include(job_name) + end end end end |