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
a12da215
Commit
a12da215
authored
Oct 27, 2018
by
Matija Čupić
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add YamlProcessor specs
parent
c2d49565
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
0 deletions
+32
-0
spec/lib/gitlab/ci/yaml_processor_spec.rb
spec/lib/gitlab/ci/yaml_processor_spec.rb
+32
-0
No files found.
spec/lib/gitlab/ci/yaml_processor_spec.rb
View file @
a12da215
...
...
@@ -136,6 +136,19 @@ module Gitlab
end
end
end
describe
'parallel entry'
do
context
'when parallel is defined'
do
let
(
:config
)
do
YAML
.
dump
(
rspec:
{
script:
'rspec'
,
parallel:
1
})
end
it
'has the attributes'
do
expect
(
subject
[
:options
][
:parallel
]).
to
eq
1
end
end
end
end
describe
'#stages_attributes'
do
...
...
@@ -645,6 +658,25 @@ module Gitlab
end
end
describe
'Parallel'
do
context
'when job is parallelized'
do
let
(
:parallel
)
{
5
}
let
(
:config
)
do
YAML
.
dump
(
rspec:
{
script:
'rspec'
,
parallel:
parallel
})
end
it
'returns parallelized job'
do
config_processor
=
Gitlab
::
Ci
::
YamlProcessor
.
new
(
config
)
builds
=
config_processor
.
stage_builds_attributes
(
"test"
)
expect
(
builds
.
size
).
to
eq
(
1
)
expect
(
builds
.
first
[
:options
][
:parallel
]).
to
eq
(
parallel
)
end
end
end
describe
'cache'
do
context
'when cache definition has unknown keys'
do
it
'raises relevant validation error'
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