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
9ceb6163
Commit
9ceb6163
authored
Sep 27, 2018
by
Shinya Maeda
Committed by
Alessio Caiazza
Oct 02, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add spec for YamlProcessor
parent
5e35e85a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
1 deletion
+16
-1
spec/lib/gitlab/ci/yaml_processor_spec.rb
spec/lib/gitlab/ci/yaml_processor_spec.rb
+16
-1
No files found.
spec/lib/gitlab/ci/yaml_processor_spec.rb
View file @
9ceb6163
...
...
@@ -121,6 +121,21 @@ module Gitlab
end
end
end
describe
'delayed job entry'
do
context
'when delayed is defined'
do
let
(
:config
)
do
YAML
.
dump
(
rspec:
{
script:
'rollout 10%'
,
when:
'delayed'
,
start_in:
'1 day'
})
end
it
'has the attributes'
do
expect
(
subject
[
:when
]).
to
eq
'delayed'
expect
(
subject
[
:options
][
:start_in
]).
to
eq
'1 day'
end
end
end
end
describe
'#stages_attributes'
do
...
...
@@ -1260,7 +1275,7 @@ module Gitlab
config
=
YAML
.
dump
({
rspec:
{
script:
"test"
,
when:
1
}
})
expect
do
Gitlab
::
Ci
::
YamlProcessor
.
new
(
config
)
end
.
to
raise_error
(
Gitlab
::
Ci
::
YamlProcessor
::
ValidationError
,
"jobs:rspec when should be on_success, on_failure, always
or manual
"
)
end
.
to
raise_error
(
Gitlab
::
Ci
::
YamlProcessor
::
ValidationError
,
"jobs:rspec when should be on_success, on_failure, always
, manual or delayed
"
)
end
it
"returns errors if job artifacts:name is not an a string"
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