diff options
author | Matija Čupić <matteeyah@gmail.com> | 2019-01-09 16:57:11 +0100 |
---|---|---|
committer | Matija Čupić <matteeyah@gmail.com> | 2019-01-09 16:57:11 +0100 |
commit | ebdf9fada7b2f02301b259160b69c6a2750a713a (patch) | |
tree | 958c9ffdfc342631f72a59a3fd14aa901f4d42d4 /spec/lib/gitlab/ci/config | |
parent | 81aacf9c6f6c8565638ee340d5df96e2f7d1de53 (diff) | |
download | gitlab-ce-ebdf9fada7b2f02301b259160b69c6a2750a713a.tar.gz |
Add specs for both parallel and regular job deps
Diffstat (limited to 'spec/lib/gitlab/ci/config')
-rw-r--r-- | spec/lib/gitlab/ci/config/normalizer_spec.rb | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/spec/lib/gitlab/ci/config/normalizer_spec.rb b/spec/lib/gitlab/ci/config/normalizer_spec.rb index 97926695b6e..cd880177170 100644 --- a/spec/lib/gitlab/ci/config/normalizer_spec.rb +++ b/spec/lib/gitlab/ci/config/normalizer_spec.rb @@ -62,5 +62,25 @@ describe Gitlab::Ci::Config::Normalizer do expect(subject[:other_job][:dependencies]).not_to include(job_name) end end + + context 'when there are dependencies which are both parallelized and not' do + let(:config) do + { + job_name => job_config, + other_job: { script: 'echo 1' }, + final_job: { script: 'echo 1', dependencies: [job_name.to_s, "other_job"] } + } + end + + it 'parallelizes dependencies' do + job_names = ["rspec 1/5", "rspec 2/5", "rspec 3/5", "rspec 4/5", "rspec 5/5"] + + expect(subject[:final_job][:dependencies]).to include(*job_names) + end + + it 'includes the regular job in dependencies' do + expect(subject[:final_job][:dependencies]).to include('other_job') + end + end end end |