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
2f054c2d
Commit
2f054c2d
authored
Mar 22, 2018
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix specs related to creating a pipeline / EE compatibility
parent
6c3ac5da
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
7 deletions
+11
-7
spec/factories/clusters/clusters.rb
spec/factories/clusters/clusters.rb
+1
-1
spec/lib/gitlab/ci/pipeline/chain/populate_spec.rb
spec/lib/gitlab/ci/pipeline/chain/populate_spec.rb
+2
-2
spec/models/ci/pipeline_spec.rb
spec/models/ci/pipeline_spec.rb
+8
-4
No files found.
spec/factories/clusters/clusters.rb
View file @
2f054c2d
...
...
@@ -6,7 +6,7 @@ FactoryBot.define do
trait
:project
do
before
(
:create
)
do
|
cluster
,
evaluator
|
cluster
.
projects
<<
create
(
:project
)
cluster
.
projects
<<
create
(
:project
,
:repository
)
end
end
...
...
spec/lib/gitlab/ci/pipeline/chain/populate_spec.rb
View file @
2f054c2d
require
'spec_helper'
describe
Gitlab
::
Ci
::
Pipeline
::
Chain
::
Populate
do
set
(
:project
)
{
create
(
:project
)
}
set
(
:project
)
{
create
(
:project
,
:repository
)
}
set
(
:user
)
{
create
(
:user
)
}
let
(
:pipeline
)
do
...
...
@@ -139,7 +139,7 @@ describe Gitlab::Ci::Pipeline::Chain::Populate do
end
let
(
:pipeline
)
do
build
(
:ci_pipeline
,
ref:
'master'
,
config:
config
)
build
(
:ci_pipeline
,
ref:
'master'
,
project:
project
,
config:
config
)
end
it
'populates pipeline according to used policies'
do
...
...
spec/models/ci/pipeline_spec.rb
View file @
2f054c2d
...
...
@@ -269,7 +269,7 @@ describe Ci::Pipeline, :mailer do
context
'when refs policy is specified'
do
let
(
:pipeline
)
do
build
(
:ci_pipeline
,
ref:
'feature'
,
tag:
true
,
config:
config
)
build
(
:ci_pipeline
,
ref:
'feature'
,
tag:
true
,
project:
project
,
config:
config
)
end
let
(
:config
)
do
...
...
@@ -287,7 +287,9 @@ describe Ci::Pipeline, :mailer do
end
context
'when source policy is specified'
do
let
(
:pipeline
)
{
build
(
:ci_pipeline
,
source: :schedule
,
config:
config
)
}
let
(
:pipeline
)
do
build
(
:ci_pipeline
,
source: :schedule
,
project:
project
,
config:
config
)
end
let
(
:config
)
do
{
production:
{
stage:
'deploy'
,
script:
'cap prod'
,
only:
[
'triggers'
]
},
...
...
@@ -327,7 +329,7 @@ describe Ci::Pipeline, :mailer do
end
context
'when user configured kubernetes from Integration > Kubernetes'
do
let
(
:project
)
{
create
(
:kubernetes_project
)
}
let
(
:project
)
{
create
(
:kubernetes_project
,
:repository
)
}
let
(
:pipeline
)
{
build
(
:ci_pipeline
,
project:
project
,
config:
config
)
}
it_behaves_like
'same behavior between KubernetesService and Platform::Kubernetes'
...
...
@@ -355,13 +357,15 @@ describe Ci::Pipeline, :mailer do
describe
'#seeds_size'
do
context
'when refs policy is specified'
do
let
(
:project
)
{
create
(
:project
,
:repository
)
}
let
(
:config
)
do
{
production:
{
stage:
'deploy'
,
script:
'cap prod'
,
only:
[
'master'
]
},
spinach:
{
stage:
'test'
,
script:
'spinach'
,
only:
[
'tags'
]
}
}
end
let
(
:pipeline
)
do
build
(
:ci_pipeline
,
ref:
'feature'
,
tag:
true
,
config:
config
)
build
(
:ci_pipeline
,
ref:
'feature'
,
tag:
true
,
project:
project
,
config:
config
)
end
it
'returns real seeds size'
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