summaryrefslogtreecommitdiff
path: root/lib/gitlab/verify/uploads.rb
blob: 0ffa71a6d724d683eff044641c8e20f191a327c8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
module Gitlab
  module Verify
    class Uploads < BatchVerifier
      def name
        'Uploads'
      end

      def describe(object)
        "Upload: #{object.id}"
      end

      private

      def relation
        Upload.with_files_stored_locally
      end

      def expected_checksum(upload)
        upload.checksum
      end

      def actual_checksum(upload)
        Upload.hexdigest(upload.absolute_path)
      end
    end
  end
end