Read about our upcoming Code of Conduct on this issue

Commit 85cca81f authored by Shinya Maeda's avatar Shinya Maeda
Browse files

Added spec for trace archiving.

parent 82787e76a87c
......@@ -21,7 +21,7 @@ class BuildTraceChunk < ActiveRecord::Base
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 @@
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