Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
7d7b0688
Commit
7d7b0688
authored
Mar 21, 2018
by
Tomasz Maczukin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add validation for max_timeout in Ci::Runner
parent
c747d9bc
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
1 deletion
+5
-1
app/models/ci/runner.rb
app/models/ci/runner.rb
+4
-0
spec/models/ci/build_spec.rb
spec/models/ci/build_spec.rb
+1
-1
No files found.
app/models/ci/runner.rb
View file @
7d7b0688
...
...
@@ -54,6 +54,10 @@ module Ci
chronic_duration_attr
:maximum_timeout_human_readable
,
:maximum_timeout
validates
:maximum_timeout
,
allow_nil:
true
,
numericality:
{
greater_than_or_equal_to:
600
,
message:
'needs to be at least 10 minutes'
}
# Searches for runners matching the given query.
#
# This method uses ILIKE on PostgreSQL and LIKE on MySQL.
...
...
spec/models/ci/build_spec.rb
View file @
7d7b0688
...
...
@@ -1299,7 +1299,7 @@ describe Ci::Build do
end
context
'when runner sets timeout to smaller value'
do
let
(
:runner2
)
{
create
(
:ci_runner
,
maximum_timeout:
5
00
)
}
let
(
:runner2
)
{
create
(
:ci_runner
,
maximum_timeout:
6
00
)
}
let
(
:build
)
{
create
(
:ci_build
,
:pending
,
pipeline:
pipeline2
,
runner:
runner2
)
}
it
'returns project timeout configuration'
do
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment