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:
Diffstat (limited to 'spec/services/security/merge_reports_service_spec.rb')
-rw-r--r--spec/services/security/merge_reports_service_spec.rb105
1 files changed, 57 insertions, 48 deletions
diff --git a/spec/services/security/merge_reports_service_spec.rb b/spec/services/security/merge_reports_service_spec.rb
index 809d0b27c20..c141bbe5b5a 100644
--- a/spec/services/security/merge_reports_service_spec.rb
+++ b/spec/services/security/merge_reports_service_spec.rb
@@ -16,78 +16,87 @@ RSpec.describe Security::MergeReportsService, '#execute', feature_category: :cod
let(:identifier_wasc) { build(:ci_reports_security_identifier, external_id: '13', external_type: 'wasc') }
let(:finding_id_1) do
- build(:ci_reports_security_finding,
- identifiers: [identifier_1_primary, identifier_1_cve],
- scanner: scanner_1,
- severity: :low
- )
+ build(
+ :ci_reports_security_finding,
+ identifiers: [identifier_1_primary, identifier_1_cve],
+ scanner: scanner_1,
+ severity: :low
+ )
end
let(:finding_id_1_extra) do
- build(:ci_reports_security_finding,
- identifiers: [identifier_1_primary, identifier_1_cve],
- scanner: scanner_1,
- severity: :low
- )
+ build(
+ :ci_reports_security_finding,
+ identifiers: [identifier_1_primary, identifier_1_cve],
+ scanner: scanner_1,
+ severity: :low
+ )
end
let(:finding_id_2_loc_1) do
- build(:ci_reports_security_finding,
- identifiers: [identifier_2_primary, identifier_2_cve],
- location: build(:ci_reports_security_locations_sast, start_line: 32, end_line: 34),
- scanner: scanner_2,
- severity: :medium
- )
+ build(
+ :ci_reports_security_finding,
+ identifiers: [identifier_2_primary, identifier_2_cve],
+ location: build(:ci_reports_security_locations_sast, start_line: 32, end_line: 34),
+ scanner: scanner_2,
+ severity: :medium
+ )
end
let(:finding_id_2_loc_1_extra) do
- build(:ci_reports_security_finding,
- identifiers: [identifier_2_primary, identifier_2_cve],
- location: build(:ci_reports_security_locations_sast, start_line: 32, end_line: 34),
- scanner: scanner_2,
- severity: :medium
- )
+ build(
+ :ci_reports_security_finding,
+ identifiers: [identifier_2_primary, identifier_2_cve],
+ location: build(:ci_reports_security_locations_sast, start_line: 32, end_line: 34),
+ scanner: scanner_2,
+ severity: :medium
+ )
end
let(:finding_id_2_loc_2) do
- build(:ci_reports_security_finding,
- identifiers: [identifier_2_primary, identifier_2_cve],
- location: build(:ci_reports_security_locations_sast, start_line: 42, end_line: 44),
- scanner: scanner_2,
- severity: :medium
- )
+ build(
+ :ci_reports_security_finding,
+ identifiers: [identifier_2_primary, identifier_2_cve],
+ location: build(:ci_reports_security_locations_sast, start_line: 42, end_line: 44),
+ scanner: scanner_2,
+ severity: :medium
+ )
end
let(:finding_cwe_1) do
- build(:ci_reports_security_finding,
- identifiers: [identifier_cwe],
- scanner: scanner_3,
- severity: :high
- )
+ build(
+ :ci_reports_security_finding,
+ identifiers: [identifier_cwe],
+ scanner: scanner_3,
+ severity: :high
+ )
end
let(:finding_cwe_2) do
- build(:ci_reports_security_finding,
- identifiers: [identifier_cwe],
- scanner: scanner_1,
- severity: :critical
- )
+ build(
+ :ci_reports_security_finding,
+ identifiers: [identifier_cwe],
+ scanner: scanner_1,
+ severity: :critical
+ )
end
let(:finding_wasc_1) do
- build(:ci_reports_security_finding,
- identifiers: [identifier_wasc],
- scanner: scanner_1,
- severity: :medium
- )
+ build(
+ :ci_reports_security_finding,
+ identifiers: [identifier_wasc],
+ scanner: scanner_1,
+ severity: :medium
+ )
end
let(:finding_wasc_2) do
- build(:ci_reports_security_finding,
- identifiers: [identifier_wasc],
- scanner: scanner_2,
- severity: :critical
- )
+ build(
+ :ci_reports_security_finding,
+ identifiers: [identifier_wasc],
+ scanner: scanner_2,
+ severity: :critical
+ )
end
let(:report_1_findings) { [finding_id_1, finding_id_2_loc_1, finding_id_2_loc_1_extra, finding_cwe_2, finding_wasc_1] }