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
0
Merge Requests
0
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
Jérome Perrin
gitlab-ce
Commits
b228787f
Commit
b228787f
authored
8 years ago
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
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
5 deletions
+3
-5
lib/gitlab/ci/config/node/configurable.rb
lib/gitlab/ci/config/node/configurable.rb
+1
-1
spec/lib/gitlab/ci/config/node/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
...
...
This diff is collapsed.
Click to expand it.
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
...
...
This diff is collapsed.
Click to expand it.
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