blob: 4a83b5898efdc03d1ef8e84b55b971f086398c47 (
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_sbom_report, class: '::Gitlab::Ci::Reports::Sbom::Report' do
transient do
num_components { 5 }
components { build_list :ci_reports_sbom_component, num_components }
source { association :ci_reports_sbom_source }
end
after(:build) do |report, options|
options.components.each { |component| report.add_component(component) }
report.set_source(options.source)
end
skip_create
end
end
|