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
b49e7966
Commit
b49e7966
authored
Mar 21, 2017
by
Rydkin Maxim
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor spec
parent
d2f2168b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
10 deletions
+7
-10
create_pipeline_service_spec.rb
spec/services/ci/create_pipeline_service_spec.rb
+7
-10
No files found.
spec/services/ci/create_pipeline_service_spec.rb
View file @
b49e7966
...
@@ -47,31 +47,28 @@ describe Ci::CreatePipelineService, services: true do
...
@@ -47,31 +47,28 @@ describe Ci::CreatePipelineService, services: true do
pipeline
pipeline
pipeline_on_previous_commit
pipeline_on_previous_commit
expect
(
pipeline
.
reload
)
expect
(
pipeline
.
reload
).
to
have_attributes
(
status:
'pending'
,
auto_canceled_by_id:
nil
)
.
to
have_attributes
(
status:
'pending'
,
auto_canceled_by_id:
nil
)
end
end
it
'auto cancel pending non-HEAD pipelines'
do
it
'auto cancel pending non-HEAD pipelines'
do
p
ending_pipeline
=
p
ipeline_on_previous_commit
pipeline_on_previous_commit
pipeline
pipeline
expect
(
p
ending_pipeline
.
reload
).
to
have_attributes
(
status:
'canceled'
,
auto_canceled_by_id:
pipeline
.
id
)
expect
(
p
ipeline_on_previous_commit
.
reload
).
to
have_attributes
(
status:
'canceled'
,
auto_canceled_by_id:
pipeline
.
id
)
end
end
it
'does not cancel running outdated pipelines'
do
it
'does not cancel running outdated pipelines'
do
running_pipeline
=
pipeline_on_previous_commit
pipeline_on_previous_commit
.
run
running_pipeline
.
run
execute_service
execute_service
expect
(
running_pipeline
.
reload
).
to
have_attributes
(
status:
'running'
,
auto_canceled_by_id:
nil
)
expect
(
pipeline_on_previous_commit
.
reload
).
to
have_attributes
(
status:
'running'
,
auto_canceled_by_id:
nil
)
end
end
it
'cancel created outdated pipelines'
do
it
'cancel created outdated pipelines'
do
created_pipeline
=
pipeline_on_previous_commit
pipeline_on_previous_commit
.
update
(
status:
'created'
)
created_pipeline
.
update
(
status:
'created'
)
pipeline
pipeline
expect
(
created_pipeline
.
reload
).
to
have_attributes
(
status:
'canceled'
,
auto_canceled_by_id:
pipeline
.
id
)
expect
(
pipeline_on_previous_commit
.
reload
).
to
have_attributes
(
status:
'canceled'
,
auto_canceled_by_id:
pipeline
.
id
)
end
end
it
'does not cancel pipelines from the other branches'
do
it
'does not cancel pipelines from the other branches'
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