summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzegorz@gitlab.com>2018-11-08 13:24:37 +0000
committerGrzegorz Bizon <grzegorz@gitlab.com>2018-11-08 13:24:37 +0000
commit2019d195a1528adfde6d962262a4781007a7cb66 (patch)
treed10bf6c655c260e9f13918758a2476590f1cd570 /spec
parent5b270431399ca14198d7684c1855de04ee8aec5e (diff)
parent036c9c58ba04046241a2183ec98ad84fcfd0a5bf (diff)
downloadgitlab-ce-2019d195a1528adfde6d962262a4781007a7cb66.tar.gz
Merge branch 'limit-parallel-to-100' into 'master'
Limit parallel to 50 Closes #53711 See merge request gitlab-org/gitlab-ce!22907
Diffstat (limited to 'spec')
-rw-r--r--spec/lib/gitlab/ci/config/entry/job_spec.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/lib/gitlab/ci/config/entry/job_spec.rb b/spec/lib/gitlab/ci/config/entry/job_spec.rb
index ac9b0c674a5..57d4577a90c 100644
--- a/spec/lib/gitlab/ci/config/entry/job_spec.rb
+++ b/spec/lib/gitlab/ci/config/entry/job_spec.rb
@@ -118,6 +118,16 @@ describe Gitlab::Ci::Config::Entry::Job do
end
end
+ context 'when it is bigger than 50' do
+ let(:config) { { parallel: 51 } }
+
+ it 'returns error about value too high' do
+ expect(entry).not_to be_valid
+ expect(entry.errors)
+ .to include 'job parallel must be less than or equal to 50'
+ end
+ end
+
context 'when it is not an integer' do
let(:config) { { parallel: 1.5 } }