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

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-08-19 12:08:42 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-08-19 12:08:42 +0300
commitb76ae638462ab0f673e5915986070518dd3f9ad3 (patch)
treebdab0533383b52873be0ec0eb4d3c66598ff8b91 /spec/factories/ci/reports/security/locations/sast.rb
parent434373eabe7b4be9593d18a585fb763f1e5f1a6f (diff)
Add latest changes from gitlab-org/gitlab@14-2-stable-eev14.2.0-rc42
Diffstat (limited to 'spec/factories/ci/reports/security/locations/sast.rb')
-rw-r--r--spec/factories/ci/reports/security/locations/sast.rb23
1 files changed, 23 insertions, 0 deletions
diff --git a/spec/factories/ci/reports/security/locations/sast.rb b/spec/factories/ci/reports/security/locations/sast.rb
new file mode 100644
index 00000000000..59b54ecd8f2
--- /dev/null
+++ b/spec/factories/ci/reports/security/locations/sast.rb
@@ -0,0 +1,23 @@
+# frozen_string_literal: true
+
+FactoryBot.define do
+ factory :ci_reports_security_locations_sast, class: '::Gitlab::Ci::Reports::Security::Locations::Sast' do
+ file_path { 'maven/src/main/java/com/gitlab/security_products/tests/App.java' }
+ start_line { 29 }
+ end_line { 31 }
+ class_name { 'com.gitlab.security_products.tests.App' }
+ method_name { 'insecureCypher' }
+
+ skip_create
+
+ initialize_with do
+ ::Gitlab::Ci::Reports::Security::Locations::Sast.new(**attributes)
+ end
+
+ trait :dynamic do
+ sequence(:file_path, 'a') { |n| "path/#{n}" }
+ start_line { Random.rand(20) }
+ end_line { start_line + Random.rand(5) }
+ end
+ end
+end