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
aa264f5a
Commit
aa264f5a
authored
Apr 15, 2020
by
Aleksei Lipniagov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add explicit arg check in :minutes_cost_factor
parent
2fc4cd6d
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
1 deletion
+11
-1
ee/app/models/ee/ci/runner.rb
ee/app/models/ee/ci/runner.rb
+3
-1
ee/spec/models/ee/ci/runner_spec.rb
ee/spec/models/ee/ci/runner_spec.rb
+8
-0
No files found.
ee/app/models/ee/ci/runner.rb
View file @
aa264f5a
...
...
@@ -15,8 +15,10 @@ module EE
case
access_level
when
::
Gitlab
::
VisibilityLevel
::
PUBLIC
public_projects_minutes_cost_factor
else
# Gitlab::VisibilityLevel::PRIVATE/
INTERNAL
when
::
Gitlab
::
VisibilityLevel
::
PRIVATE
,
::
Gitlab
::
VisibilityLevel
::
INTERNAL
private_projects_minutes_cost_factor
else
raise
ArgumentError
,
'Invalid visibility level'
end
end
...
...
ee/spec/models/ee/ci/runner_spec.rb
View file @
aa264f5a
...
...
@@ -71,6 +71,14 @@ describe EE::Ci::Runner do
it
{
is_expected
.
to
eq
(
1.1
)
}
end
context
'with invalid visibility level'
do
let
(
:visibility_level
)
{
123
}
it
'raises an error'
do
expect
{
subject
}.
to
raise_error
(
ArgumentError
)
end
end
end
end
...
...
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