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

metadatum.rb « sbom « reports « ci « factories « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: f05ace8754f7110139a09a0ff20830397ccf7094 (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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# frozen_string_literal: true

FactoryBot.define do
  factory :ci_reports_sbom_metadata, class: '::Gitlab::Ci::Reports::Sbom::Metadata' do
    transient do
      vendor { generate(:name) }
      author_name { generate(:name) }
    end

    tools do
      [
        {
          vendor: vendor,
          name: "Gemnasium",
          version: "2.34.0"
        }
      ]
    end
    authors do
      [
        {
          name: author_name,
          email: "support@gitlab.com"
        }
      ]
    end
    properties do
      [
        {
          name: "gitlab:dependency_scanning:input_file:path",
          value: "package-lock.json"
        },
        {
          name: "gitlab:dependency_scanning:package_manager:name",
          value: "npm"
        }
      ]
    end

    skip_create

    initialize_with { new(tools: tools, authors: authors, properties: properties) }
  end
end