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
4e3fc212
Commit
4e3fc212
authored
Feb 09, 2017
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Extend specs for canceling a running pipeline
parent
ffcf3c68
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
2 deletions
+15
-2
spec/models/ci/pipeline_spec.rb
spec/models/ci/pipeline_spec.rb
+15
-2
No files found.
spec/models/ci/pipeline_spec.rb
View file @
4e3fc212
...
...
@@ -728,7 +728,7 @@ describe Ci::Pipeline, models: true do
describe
'#cancel_running'
do
let
(
:latest_status
)
{
pipeline
.
statuses
.
pluck
(
:status
)
}
context
'when there is a running external job and
created build
'
do
context
'when there is a running external job and
a regular job
'
do
before
do
create
(
:ci_build
,
:running
,
pipeline:
pipeline
)
create
(
:generic_commit_status
,
:running
,
pipeline:
pipeline
)
...
...
@@ -741,7 +741,7 @@ describe Ci::Pipeline, models: true do
end
end
context
'when
build
s are in different stages'
do
context
'when
job
s are in different stages'
do
before
do
create
(
:ci_build
,
:running
,
stage_idx:
0
,
pipeline:
pipeline
)
create
(
:ci_build
,
:running
,
stage_idx:
1
,
pipeline:
pipeline
)
...
...
@@ -753,6 +753,19 @@ describe Ci::Pipeline, models: true do
expect
(
latest_status
).
to
contain_exactly
(
'canceled'
,
'canceled'
)
end
end
context
'when there are created builds present in the pipeline'
do
before
do
create
(
:ci_build
,
:running
,
stage_idx:
0
,
pipeline:
pipeline
)
create
(
:ci_build
,
:created
,
stage_idx:
1
,
pipeline:
pipeline
)
pipeline
.
cancel_running
end
it
'skips created builds'
do
expect
(
latest_status
).
to
eq
[
'canceled'
,
'skipped'
]
end
end
end
describe
'#retry_failed'
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