BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
3761a0c5
Commit
3761a0c5
authored
Nov 27, 2016
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Extend pipelines factory with transient config attribute
parent
86e7f22b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
14 deletions
+9
-14
pipelines.rb
spec/factories/ci/pipelines.rb
+8
-13
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,21 +21,16 @@ FactoryGirl.define do
end
factory
:ci_pipeline
do
after
(
:build
)
do
|
pipeline
|
allow
(
pipeline
).
to
receive
(
:ci_yaml_file
)
do
File
.
read
(
Rails
.
root
.
join
(
'spec/support/gitlab_stubs/gitlab_ci.yml'
))
end
end
end
factory
(
:ci_pipeline_with_yaml
)
do
transient
{
yaml
nil
}
transient
{
config
nil
}
after
(
:build
)
do
|
pipeline
,
evaluator
|
raise
ArgumentError
unless
evaluator
.
yaml
allow
(
pipeline
).
to
receive
(
:ci_yaml_file
)
.
and_return
(
YAML
.
dump
(
evaluator
.
yaml
))
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
end
end
...
...
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
...
...
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