Commit c46101e2 authored by Shinya Maeda's avatar Shinya Maeda

Added spec for trace archiving.

parent 610451b4
......@@ -21,7 +21,7 @@ module Ci
def self.delayed_cleanup_blk
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
puts "before cleanup: #{ids.count}"
......
......@@ -360,9 +360,11 @@ describe Ci::BuildTraceChunk, :clean_gitlab_redis_shared_state do
end
end
context 'when build is destroyed' do
context 'when traces are archived' do
let(:subject) do
project.builds.destroy_all
project.builds.each do |build|
build.success!
end
end
it_behaves_like 'deletes all build_trace_chunk and data in redis'
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment