diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-09-20 14:18:08 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-09-20 14:18:08 +0300 |
commit | 5afcbe03ead9ada87621888a31a62652b10a7e4f (patch) | |
tree | 9918b67a0d0f0bafa6542e839a8be37adf73102d /spec/services/security/merge_reports_service_spec.rb | |
parent | c97c0201564848c1f53226fe19d71fdcc472f7d0 (diff) |
Add latest changes from gitlab-org/gitlab@16-4-stable-eev16.4.0-rc42
Diffstat (limited to 'spec/services/security/merge_reports_service_spec.rb')
-rw-r--r-- | spec/services/security/merge_reports_service_spec.rb | 105 |
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] } |