diff options
Diffstat (limited to 'spec/factories/ci/job_artifacts.rb')
-rw-r--r-- | spec/factories/ci/job_artifacts.rb | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/spec/factories/ci/job_artifacts.rb b/spec/factories/ci/job_artifacts.rb index bfd8506566b..17cd495e217 100644 --- a/spec/factories/ci/job_artifacts.rb +++ b/spec/factories/ci/job_artifacts.rb @@ -1,7 +1,5 @@ # frozen_string_literal: true -include ActionDispatch::TestProcess - FactoryBot.define do factory :ci_job_artifact, class: 'Ci::JobArtifact' do job factory: :ci_build @@ -279,6 +277,16 @@ FactoryBot.define do end end + trait :sast_minimal do + file_type { :sast } + file_format { :raw } + + after(:build) do |artifact, _| + artifact.file = fixture_file_upload( + Rails.root.join('spec/fixtures/security_reports/master/gl-sast-report-minimal.json'), 'application/json') + end + end + trait :secret_detection do file_type { :secret_detection } file_format { :raw } |