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
Léo-Paul Géneau
gitlab-ce
Commits
bee26f9c
Commit
bee26f9c
authored
Feb 18, 2016
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add specs covering bug in build allowed to fail case
parent
52d5eefd
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
0 deletions
+29
-0
spec/models/ci/commit_spec.rb
spec/models/ci/commit_spec.rb
+29
-0
No files found.
spec/models/ci/commit_spec.rb
View file @
bee26f9c
...
@@ -247,6 +247,35 @@ describe Ci::Commit, models: true do
...
@@ -247,6 +247,35 @@ describe Ci::Commit, models: true do
end
end
end
end
context
'custom stage with first job allowed to fail'
do
let
(
:yaml
)
do
{
stages:
[
'clean'
,
'test'
],
clean_job:
{
stage:
'clean'
,
allow_failure:
true
,
script:
'BUILD'
,
},
test_job:
{
stage:
'test'
,
script:
'TEST'
,
},
}
end
before
do
stub_ci_commit_yaml_file
(
YAML
.
dump
(
yaml
))
create_builds
end
it
'properly schedules builds'
do
expect
(
commit
.
builds
.
pluck
(
:status
)).
to
contain_exactly
(
'pending'
)
commit
.
builds
.
running_or_pending
.
each
(
&
:drop
)
expect
(
commit
.
builds
.
pluck
(
:status
)).
to
contain_exactly
(
'pending'
,
'failed'
)
end
end
context
'properly creates builds when "when" is defined'
do
context
'properly creates builds when "when" is defined'
do
let
(
:yaml
)
do
let
(
:yaml
)
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