Fix statis analysys

This commit is contained in:
Shinya Maeda 2018-04-23 15:20:55 +09:00
parent bc43588ce9
commit 8a7654a52b
2 changed files with 3 additions and 3 deletions

View File

@ -79,8 +79,8 @@ module Ci
def use_database!
in_lock do
return if db?
return unless size > 0
break if db?
break unless size > 0
self.update!(raw_data: data, data_store: :db)
redis_delete_data

View File

@ -535,7 +535,7 @@ describe Gitlab::Ci::Trace, :clean_gitlab_redis_cache do
context 'when job does not have trace artifact' do
context 'when trace file stored in default path' do
let(:build) { create(:ci_build, :success, :trace_live) }
let(:src_path) { trace.read { |s| return s.path } }
let(:src_path) { trace.read { |s| s.path } }
let(:src_checksum) { Digest::SHA256.file(src_path).hexdigest }
before do