diff options
author | Kamil Trzciński <ayufan@ayufan.eu> | 2018-11-08 10:34:26 +0100 |
---|---|---|
committer | Kamil Trzciński <ayufan@ayufan.eu> | 2018-11-08 11:58:54 +0100 |
commit | 036c9c58ba04046241a2183ec98ad84fcfd0a5bf (patch) | |
tree | 99f47fe15bd0aff26e8676a70e76755ceefe5fbe /spec/lib/gitlab/ci/config/entry/job_spec.rb | |
parent | b3b9817e5100ae2e827794d87ac6a6649571eddc (diff) | |
download | gitlab-ce-036c9c58ba04046241a2183ec98ad84fcfd0a5bf.tar.gz |
Limit parallel to 100limit-parallel-to-100
This prevents some of the abusive behaviors, of someone putting 100000 and creating out of memory condition easily
Diffstat (limited to 'spec/lib/gitlab/ci/config/entry/job_spec.rb')
-rw-r--r-- | spec/lib/gitlab/ci/config/entry/job_spec.rb | 10 |
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 } } |