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
02e3a624
Commit
02e3a624
authored
Jul 03, 2018
by
Shinya Maeda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simplified factory traits
parent
53234295
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
13 deletions
+3
-13
spec/factories/ci/build_trace_chunks.rb
spec/factories/ci/build_trace_chunks.rb
+3
-13
No files found.
spec/factories/ci/build_trace_chunks.rb
View file @
02e3a624
...
...
@@ -12,12 +12,7 @@ FactoryBot.define do
end
after
(
:create
)
do
|
build_trace_chunk
,
evaluator
|
Gitlab
::
Redis
::
SharedState
.
with
do
|
redis
|
redis
.
set
(
"gitlab:ci:trace:
#{
build_trace_chunk
.
build
.
id
}
:chunks:
#{
build_trace_chunk
.
chunk_index
.
to_i
}
"
,
evaluator
.
initial_data
,
ex:
1
.
day
)
end
Ci
::
BuildTraceChunk
::
Redis
.
new
.
set_data
(
build_trace_chunk
,
evaluator
.
initial_data
)
end
end
...
...
@@ -33,7 +28,7 @@ FactoryBot.define do
end
after
(
:build
)
do
|
build_trace_chunk
,
evaluator
|
build_trace_chunk
.
raw_data
=
evaluator
.
initial_data
Ci
::
BuildTraceChunk
::
Database
.
new
.
set_data
(
build_trace_chunk
,
evaluator
.
initial_data
)
end
end
...
...
@@ -49,12 +44,7 @@ FactoryBot.define do
end
after
(
:create
)
do
|
build_trace_chunk
,
evaluator
|
::
Fog
::
Storage
.
new
(
JobArtifactUploader
.
object_store_credentials
).
tap
do
|
connection
|
connection
.
put_object
(
'artifacts'
,
"tmp/builds/
#{
build_trace_chunk
.
build
.
id
}
/chunks/
#{
build_trace_chunk
.
chunk_index
.
to_i
}
.log"
,
evaluator
.
initial_data
)
end
Ci
::
BuildTraceChunk
::
Fog
.
new
.
set_data
(
build_trace_chunk
,
evaluator
.
initial_data
)
end
end
...
...
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