summaryrefslogtreecommitdiff
path: root/spec/factories/ci/job_artifacts.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-05-19 15:44:42 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2021-05-19 15:44:42 +0000
commit4555e1b21c365ed8303ffb7a3325d773c9b8bf31 (patch)
tree5423a1c7516cffe36384133ade12572cf709398d /spec/factories/ci/job_artifacts.rb
parente570267f2f6b326480d284e0164a6464ba4081bc (diff)
downloadgitlab-ce-4555e1b21c365ed8303ffb7a3325d773c9b8bf31.tar.gz
Add latest changes from gitlab-org/gitlab@13-12-stable-eev13.12.0-rc42
Diffstat (limited to 'spec/factories/ci/job_artifacts.rb')
-rw-r--r--spec/factories/ci/job_artifacts.rb12
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 }