Commit 5091d431 authored by Michael Kozono's avatar Michael Kozono

Merge branch 'rename-comparer' into 'master'

Rename comparer file for generic use

See merge request gitlab-org/gitlab-ee!15133
parents 8ad7a165 b3f090e0
......@@ -3,7 +3,7 @@
module Ci
class CompareContainerScanningReportsService < ::Ci::CompareReportsBaseService
def comparer_class
Gitlab::Ci::Reports::Security::ContainerScanningReportsComparer
Gitlab::Ci::Reports::Security::VulnerabilityReportsComparer
end
def serializer_class
......
......@@ -4,13 +4,13 @@ module Gitlab
module Ci
module Reports
module Security
class ContainerScanningReportsComparer
class VulnerabilityReportsComparer
include Gitlab::Utils::StrongMemoize
attr_reader :base_report, :head_report
def initialize(base_report, head_report)
@base_report = base_report || ::Gitlab::Ci::Reports::Security::Report.new('container_scanning', '')
@base_report = base_report || ::Gitlab::Ci::Reports::Security::Report.new(head_report&.type, '')
@head_report = head_report
end
......
......@@ -7,7 +7,7 @@ describe Vulnerabilities::OccurrenceReportsComparerEntity do
let!(:head_pipeline) { create(:ee_ci_pipeline, :with_container_scanning_feature_branch) }
let(:base_report) { base_pipeline.security_reports.get_report('container_scanning')}
let(:head_report) { head_pipeline.security_reports.get_report('container_scanning')}
let(:comparer) { Gitlab::Ci::Reports::Security::ContainerScanningReportsComparer.new(base_report, head_report) }
let(:comparer) { Gitlab::Ci::Reports::Security::VulnerabilityReportsComparer.new(base_report, head_report) }
let(:entity) { described_class.new(comparer) }
before do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment