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
Boxiang Sun
gitlab-ce
Commits
ffcc200a
Commit
ffcc200a
authored
Sep 19, 2018
by
Markus Doits
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix allowed keys validator to use correct attribute as error base?
parent
452a4399
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
lib/gitlab/ci/config/entry/validators.rb
lib/gitlab/ci/config/entry/validators.rb
+2
-2
spec/lib/gitlab/ci/config/entry/job_spec.rb
spec/lib/gitlab/ci/config/entry/job_spec.rb
+1
-1
No files found.
lib/gitlab/ci/config/entry/validators.rb
View file @
ffcc200a
...
@@ -10,7 +10,7 @@ module Gitlab
...
@@ -10,7 +10,7 @@ module Gitlab
unknown_keys
=
value
.
try
(
:keys
).
to_a
-
options
[
:in
]
unknown_keys
=
value
.
try
(
:keys
).
to_a
-
options
[
:in
]
if
unknown_keys
.
any?
if
unknown_keys
.
any?
record
.
errors
.
add
(
:config
,
"
#{
attribute
}
contains unknown keys: "
+
record
.
errors
.
add
(
attribute
,
"
contains unknown keys: "
+
unknown_keys
.
join
(
', '
))
unknown_keys
.
join
(
', '
))
end
end
end
end
...
...
spec/lib/gitlab/ci/config/entry/job_spec.rb
View file @
ffcc200a
...
@@ -187,7 +187,7 @@ describe Gitlab::Ci::Config::Entry::Job do
...
@@ -187,7 +187,7 @@ describe Gitlab::Ci::Config::Entry::Job do
it
'returns error about the unknown key'
do
it
'returns error about the unknown key'
do
expect
(
entry
).
not_to
be_valid
expect
(
entry
).
not_to
be_valid
expect
(
entry
.
errors
)
expect
(
entry
.
errors
)
.
to
include
'job
config
retry contains unknown keys: unknown_key, one_more'
.
to
include
'job retry contains unknown keys: unknown_key, one_more'
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