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
3761a0c5
Commit
3761a0c5
authored
8 years ago
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Extend pipelines factory with transient config attribute
parent
86e7f22b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
14 deletions
+9
-14
spec/factories/ci/pipelines.rb
spec/factories/ci/pipelines.rb
+8
-13
spec/services/ci/process_pipeline_service_spec.rb
spec/services/ci/process_pipeline_service_spec.rb
+1
-1
No files found.
spec/factories/ci/pipelines.rb
View file @
3761a0c5
...
...
@@ -21,22 +21,17 @@ FactoryGirl.define do
end
factory
:ci_pipeline
do
after
(
:build
)
do
|
pipeline
|
transient
{
config
nil
}
after
(
:build
)
do
|
pipeline
,
evaluator
|
allow
(
pipeline
).
to
receive
(
:ci_yaml_file
)
do
if
evaluator
.
config
YAML
.
dump
(
evaluator
.
config
)
else
File
.
read
(
Rails
.
root
.
join
(
'spec/support/gitlab_stubs/gitlab_ci.yml'
))
end
end
end
factory
(
:ci_pipeline_with_yaml
)
do
transient
{
yaml
nil
}
after
(
:build
)
do
|
pipeline
,
evaluator
|
raise
ArgumentError
unless
evaluator
.
yaml
allow
(
pipeline
).
to
receive
(
:ci_yaml_file
)
.
and_return
(
YAML
.
dump
(
evaluator
.
yaml
))
end
end
end
end
This diff is collapsed.
Click to expand it.
spec/services/ci/process_pipeline_service_spec.rb
View file @
3761a0c5
...
...
@@ -295,7 +295,7 @@ describe Ci::ProcessPipelineService, services: true do
context
'when there are builds that are not created yet'
do
let
(
:pipeline
)
do
create
(
:ci_pipeline
_with_yaml
,
yaml
:
config
)
create
(
:ci_pipeline
,
config
:
config
)
end
let
(
:config
)
do
...
...
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