Commit 9ba72fe0 authored by Matija Čupić's avatar Matija Čupić

Change minimum parallel value to 2

parent ff179571
......@@ -28,7 +28,7 @@ module Gitlab
greater_than_or_equal_to: 0,
less_than_or_equal_to: 2 }
validates :parallel, numericality: { only_integer: true,
greater_than_or_equal_to: 1 }
greater_than_or_equal_to: 2 }
validates :when,
inclusion: { in: %w[on_success on_failure always manual delayed],
message: 'should be on_success, on_failure, ' \
......
......@@ -147,13 +147,13 @@ describe Gitlab::Ci::Config::Entry::Job do
end
end
context 'when it is lower than one' do
let(:config) { { parallel: 0 } }
context 'when it is lower than two' do
let(:config) { { parallel: 1 } }
it 'returns error about value too low' do
expect(entry).not_to be_valid
expect(entry.errors)
.to include 'job parallel must be greater than or equal to 1'
.to include 'job parallel must be greater than or equal to 2'
end
end
......
......@@ -141,11 +141,11 @@ module Gitlab
context 'when parallel is defined' do
let(:config) do
YAML.dump(rspec: { script: 'rspec',
parallel: 1 })
parallel: 2 })
end
it 'has the attributes' do
expect(subject[:options][:parallel]).to eq 1
expect(subject[:options][:parallel]).to eq 2
end
end
end
......
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