2018-03-27 19:54:05 +05:30
|
|
|
module Gitlab
|
|
|
|
module Verify
|
|
|
|
class Uploads < BatchVerifier
|
|
|
|
def name
|
|
|
|
'Uploads'
|
|
|
|
end
|
|
|
|
|
|
|
|
def describe(object)
|
|
|
|
"Upload: #{object.id}"
|
|
|
|
end
|
|
|
|
|
|
|
|
private
|
|
|
|
|
|
|
|
def relation
|
2018-05-09 12:01:36 +05:30
|
|
|
Upload.with_files_stored_locally
|
2018-03-27 19:54:05 +05:30
|
|
|
end
|
|
|
|
|
|
|
|
def expected_checksum(upload)
|
|
|
|
upload.checksum
|
|
|
|
end
|
|
|
|
|
|
|
|
def actual_checksum(upload)
|
|
|
|
Upload.hexdigest(upload.absolute_path)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|