BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
b228787f
Commit
b228787f
authored
Jul 12, 2016
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do not raise when getting value of invalid CI node
parent
61f7bede
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
5 deletions
+3
-5
configurable.rb
lib/gitlab/ci/config/node/configurable.rb
+1
-1
global_spec.rb
spec/lib/gitlab/ci/config/node/global_spec.rb
+2
-4
No files found.
lib/gitlab/ci/config/node/configurable.rb
View file @
b228787f
...
@@ -55,7 +55,7 @@ module Gitlab
...
@@ -55,7 +55,7 @@ module Gitlab
end
end
define_method
(
"
#{
symbol
}
_value"
)
do
define_method
(
"
#{
symbol
}
_value"
)
do
r
aise
Entry
::
InvalidError
unless
valid?
r
eturn
unless
valid?
@entries
[
symbol
].
value
if
@entries
[
symbol
]
@entries
[
symbol
].
value
if
@entries
[
symbol
]
end
end
...
...
spec/lib/gitlab/ci/config/node/global_spec.rb
View file @
b228787f
...
@@ -209,10 +209,8 @@ describe Gitlab::Ci::Config::Node::Global do
...
@@ -209,10 +209,8 @@ describe Gitlab::Ci::Config::Node::Global do
end
end
describe
'#before_script'
do
describe
'#before_script'
do
it
'raises error'
do
it
'returns nil'
do
expect
{
global
.
before_script
}.
to
raise_error
(
expect
(
global
.
before_script
).
to
be_nil
Gitlab
::
Ci
::
Config
::
Node
::
Entry
::
InvalidError
)
end
end
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