diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-11-22 18:06:00 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-11-22 18:06:00 +0000 |
commit | ea4762d464bb36f3e36e318db47086e41f493377 (patch) | |
tree | c2fb2b7d2eb2b775d9ab149dc3781975fcc4b7d5 /spec/lib/gitlab/ci/config/entry/job_spec.rb | |
parent | 68b6846fa6c7b630cc8dab7a8474dcc34e4d67d4 (diff) | |
download | gitlab-ce-ea4762d464bb36f3e36e318db47086e41f493377.tar.gz |
Add latest changes from gitlab-org/gitlab@master
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, 5 insertions, 5 deletions
diff --git a/spec/lib/gitlab/ci/config/entry/job_spec.rb b/spec/lib/gitlab/ci/config/entry/job_spec.rb index fe83171c57a..b0e08e49d78 100644 --- a/spec/lib/gitlab/ci/config/entry/job_spec.rb +++ b/spec/lib/gitlab/ci/config/entry/job_spec.rb @@ -24,7 +24,7 @@ describe Gitlab::Ci::Config::Entry::Job do let(:result) do %i[before_script script stage type after_script cache image services only except rules needs variables artifacts - environment coverage retry interruptible] + environment coverage retry interruptible timeout] end it { is_expected.to match_array result } @@ -417,21 +417,21 @@ describe Gitlab::Ci::Config::Entry::Job do context 'when timeout value is not correct' do context 'when it is higher than instance wide timeout' do - let(:config) { { timeout: '3 months' } } + let(:config) { { timeout: '3 months', script: 'test' } } it 'returns error about value too high' do expect(entry).not_to be_valid expect(entry.errors) - .to include "job timeout should not exceed the limit" + .to include "timeout config should not exceed the limit" end end context 'when it is not a duration' do - let(:config) { { timeout: 100 } } + let(:config) { { timeout: 100, script: 'test' } } it 'returns error about wrong value' do expect(entry).not_to be_valid - expect(entry.errors).to include 'job timeout should be a duration' + expect(entry.errors).to include 'timeout config should be a duration' end end end |