summaryrefslogtreecommitdiff
path: root/spec/lib/gitlab/ci/config/entry/job_spec.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-11-22 18:06:00 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2019-11-22 18:06:00 +0000
commitea4762d464bb36f3e36e318db47086e41f493377 (patch)
treec2fb2b7d2eb2b775d9ab149dc3781975fcc4b7d5 /spec/lib/gitlab/ci/config/entry/job_spec.rb
parent68b6846fa6c7b630cc8dab7a8474dcc34e4d67d4 (diff)
downloadgitlab-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.rb10
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