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
c46101e2
Commit
c46101e2
authored
Apr 30, 2018
by
Shinya Maeda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added spec for trace archiving.
parent
610451b4
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
app/models/ci/build_trace_chunk.rb
app/models/ci/build_trace_chunk.rb
+1
-1
spec/models/ci/build_trace_chunk_spec.rb
spec/models/ci/build_trace_chunk_spec.rb
+4
-2
No files found.
app/models/ci/build_trace_chunk.rb
View file @
c46101e2
...
@@ -21,7 +21,7 @@ module Ci
...
@@ -21,7 +21,7 @@ module Ci
def
self
.
delayed_cleanup_blk
def
self
.
delayed_cleanup_blk
ids
=
all
.
redis
.
pluck
(
:build_id
,
:chunk_index
).
map
do
|
data
|
ids
=
all
.
redis
.
pluck
(
:build_id
,
:chunk_index
).
map
do
|
data
|
"gitlab:ci:trace:
#{
data
.
first
}
:chunks:
#{
data
.
second
}
:data
"
"gitlab:ci:trace:
#{
data
.
first
}
:chunks:
#{
data
.
second
}
"
end
end
puts
"before cleanup:
#{
ids
.
count
}
"
puts
"before cleanup:
#{
ids
.
count
}
"
...
...
spec/models/ci/build_trace_chunk_spec.rb
View file @
c46101e2
...
@@ -360,9 +360,11 @@ describe Ci::BuildTraceChunk, :clean_gitlab_redis_shared_state do
...
@@ -360,9 +360,11 @@ describe Ci::BuildTraceChunk, :clean_gitlab_redis_shared_state do
end
end
end
end
context
'when
build is destroy
ed'
do
context
'when
traces are archiv
ed'
do
let
(
:subject
)
do
let
(
:subject
)
do
project
.
builds
.
destroy_all
project
.
builds
.
each
do
|
build
|
build
.
success!
end
end
end
it_behaves_like
'deletes all build_trace_chunk and data in redis'
it_behaves_like
'deletes all build_trace_chunk and data in redis'
...
...
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