Welcome to mirror list, hosted at ThFree Co, Russian Federation.

finding_keys.rb « security « reports « ci « factories « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: f00a043012e26428a1fae0391fb8c25545277180 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# frozen_string_literal: true

FactoryBot.define do
  factory :ci_reports_security_finding_key, class: '::Gitlab::Ci::Reports::Security::FindingKey' do
    sequence :location_fingerprint do |a|
      Digest::SHA1.hexdigest(a.to_s)
    end
    sequence :identifier_fingerprint do |a|
      Digest::SHA1.hexdigest(a.to_s)
    end

    skip_create

    initialize_with do
      ::Gitlab::Ci::Reports::Security::FindingKey.new(**attributes)
    end
  end
end