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
ecd9c309
Commit
ecd9c309
authored
Jun 08, 2017
by
Shinya Maeda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add source policy spec
parent
32bfa48a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
0 deletions
+19
-0
spec/lib/ci/gitlab_ci_yaml_processor_spec.rb
spec/lib/ci/gitlab_ci_yaml_processor_spec.rb
+19
-0
No files found.
spec/lib/ci/gitlab_ci_yaml_processor_spec.rb
View file @
ecd9c309
...
...
@@ -123,6 +123,25 @@ module Ci
expect
(
seeds
.
first
.
builds
.
dig
(
0
,
:name
)).
to
eq
'spinach'
end
end
context
'when source policy is specified'
do
let
(
:config
)
do
YAML
.
dump
(
production:
{
stage:
'deploy'
,
script:
'cap prod'
,
only:
[
'triggers'
]
},
spinach:
{
stage:
'test'
,
script:
'spinach'
,
only:
[
'schedules'
]
})
end
let
(
:pipeline
)
do
create
(
:ci_empty_pipeline
,
source: :schedule
)
end
it
'returns stage seeds only assigned to schedules'
do
seeds
=
subject
.
stage_seeds
(
pipeline
)
expect
(
seeds
.
size
).
to
eq
1
expect
(
seeds
.
first
.
stage
[
:name
]).
to
eq
'test'
expect
(
seeds
.
first
.
builds
.
dig
(
0
,
:name
)).
to
eq
'spinach'
end
end
end
describe
"#builds_for_ref"
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