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
Boxiang Sun
gitlab-ce
Commits
1def948b
Commit
1def948b
authored
Dec 14, 2017
by
Shinya Maeda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Dependencies Validator fails when depended job is `manual`
parent
9daeccfb
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
10 deletions
+7
-10
app/models/ci/build.rb
app/models/ci/build.rb
+0
-1
spec/models/ci/build_spec.rb
spec/models/ci/build_spec.rb
+3
-4
spec/services/ci/register_job_service_spec.rb
spec/services/ci/register_job_service_spec.rb
+4
-5
No files found.
app/models/ci/build.rb
View file @
1def948b
...
...
@@ -491,7 +491,6 @@ module Ci
end
def
valid_dependency?
return
false
unless
complete?
return
false
if
artifacts_expired?
return
false
if
erased?
...
...
spec/models/ci/build_spec.rb
View file @
1def948b
...
...
@@ -1861,9 +1861,9 @@ describe Ci::Build do
describe
'state transition: any => [:running]'
do
shared_examples
'validation is active'
do
context
'when depended job has not been completed yet'
do
let!
(
:pre_stage_job
)
{
create
(
:ci_build
,
:
running
,
pipeline:
pipeline
,
name:
'test'
,
stage_idx:
0
)
}
let!
(
:pre_stage_job
)
{
create
(
:ci_build
,
:
manual
,
pipeline:
pipeline
,
name:
'test'
,
stage_idx:
0
)
}
it
{
expect
{
job
.
run!
}.
to
raise_error
(
Ci
::
Build
::
MissingDependenciesError
)
}
it
{
expect
{
job
.
run!
}.
not_
to
raise_error
(
Ci
::
Build
::
MissingDependenciesError
)
}
end
context
'when artifacts of depended job has been expired'
do
...
...
@@ -1885,11 +1885,10 @@ describe Ci::Build do
shared_examples
'validation is not active'
do
context
'when depended job has not been completed yet'
do
let!
(
:pre_stage_job
)
{
create
(
:ci_build
,
:
running
,
pipeline:
pipeline
,
name:
'test'
,
stage_idx:
0
)
}
let!
(
:pre_stage_job
)
{
create
(
:ci_build
,
:
manual
,
pipeline:
pipeline
,
name:
'test'
,
stage_idx:
0
)
}
it
{
expect
{
job
.
run!
}.
not_to
raise_error
}
end
context
'when artifacts of depended job has been expired'
do
let!
(
:pre_stage_job
)
{
create
(
:ci_build
,
:success
,
:expired
,
pipeline:
pipeline
,
name:
'test'
,
stage_idx:
0
)
}
...
...
spec/services/ci/register_job_service_spec.rb
View file @
1def948b
...
...
@@ -287,9 +287,9 @@ module Ci
shared_examples
'validation is active'
do
context
'when depended job has not been completed yet'
do
let!
(
:pre_stage_job
)
{
create
(
:ci_build
,
:
running
,
pipeline:
pipeline
,
name:
'test'
,
stage_idx:
0
)
}
let!
(
:pre_stage_job
)
{
create
(
:ci_build
,
:
manual
,
pipeline:
pipeline
,
name:
'test'
,
stage_idx:
0
)
}
it
_behaves_like
'not pick'
it
{
expect
(
subject
).
to
eq
(
pending_job
)
}
end
context
'when artifacts of depended job has been expired'
do
...
...
@@ -309,7 +309,7 @@ module Ci
end
context
'when job object is staled'
do
let!
(
:pre_stage_job
)
{
create
(
:ci_build
,
:
running
,
pipeline:
pipeline
,
name:
'test'
,
stage_idx:
0
)
}
let!
(
:pre_stage_job
)
{
create
(
:ci_build
,
:
success
,
:expired
,
pipeline:
pipeline
,
name:
'test'
,
stage_idx:
0
)
}
before
do
allow_any_instance_of
(
Ci
::
Build
).
to
receive
(
:drop!
)
...
...
@@ -324,11 +324,10 @@ module Ci
shared_examples
'validation is not active'
do
context
'when depended job has not been completed yet'
do
let!
(
:pre_stage_job
)
{
create
(
:ci_build
,
:
running
,
pipeline:
pipeline
,
name:
'test'
,
stage_idx:
0
)
}
let!
(
:pre_stage_job
)
{
create
(
:ci_build
,
:
manual
,
pipeline:
pipeline
,
name:
'test'
,
stage_idx:
0
)
}
it
{
expect
(
subject
).
to
eq
(
pending_job
)
}
end
context
'when artifacts of depended job has been expired'
do
let!
(
:pre_stage_job
)
{
create
(
:ci_build
,
:success
,
:expired
,
pipeline:
pipeline
,
name:
'test'
,
stage_idx:
0
)
}
...
...
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