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
6f843457
Commit
6f843457
authored
8 years ago
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve build retry service tests for cloning data
parent
dd9d8ce8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
2 deletions
+13
-2
spec/factories/ci/builds.rb
spec/factories/ci/builds.rb
+8
-0
spec/services/ci/retry_build_service_spec.rb
spec/services/ci/retry_build_service_spec.rb
+5
-2
No files found.
spec/factories/ci/builds.rb
View file @
6f843457
...
...
@@ -80,6 +80,14 @@ FactoryGirl.define do
tag_list
[
:docker
,
:ruby
]
end
trait
:on_tag
do
tag
true
end
trait
:triggered
do
trigger_request
factory: :ci_trigger_request_with_variables
end
after
(
:build
)
do
|
build
,
evaluator
|
build
.
project
=
build
.
pipeline
.
project
end
...
...
This diff is collapsed.
Click to expand it.
spec/services/ci/retry_build_service_spec.rb
View file @
6f843457
...
...
@@ -12,13 +12,16 @@ describe Ci::RetryBuildService, :services do
shared_examples
'build duplication'
do
let
(
:build
)
do
create
(
:ci_build
,
:failed
,
:artifacts_expired
,
:erased
,
:trace
,
:queued
,
:coverage
,
:tags
,
pipeline:
pipeline
)
create
(
:ci_build
,
:failed
,
:artifacts_expired
,
:erased
,
:queued
,
:coverage
,
:tags
,
:allowed_to_fail
,
:on_tag
,
:teardown_environment
,
:triggered
,
:trace
,
description:
'some build'
,
pipeline:
pipeline
)
end
describe
'clone attributes'
do
described_class
::
CLONE_ACCESSORS
.
each
do
|
attribute
|
it
"clones
#{
attribute
}
build attribute"
do
expect
(
new_build
.
send
(
attribute
)).
to
be_present
expect
(
new_build
.
send
(
attribute
)).
to
eq
build
.
send
(
attribute
)
end
end
...
...
This diff is collapsed.
Click to expand it.
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