Commit fdc8979e authored by Dylan Griffith's avatar Dylan Griffith

Merge branch '336200-remove-unused-code' into 'master'

Remove unused scope from `Ci::Pipeline`

See merge request gitlab-org/gitlab!67162
parents 560cd6ad 3c71929b
......@@ -34,10 +34,6 @@ module EE
joins(:downloadable_artifacts).where(ci_builds: { name: %w[sast secret_detection dependency_scanning container_scanning dast] })
end
scope :with_vulnerabilities, -> do
where('EXISTS (?)', ::Vulnerabilities::FindingPipeline.where('ci_pipelines.id=vulnerability_occurrence_pipelines.pipeline_id').select(1))
end
# This structure describes feature levels
# to access the file types for given reports
REPORT_LICENSED_FEATURES = {
......
......@@ -31,21 +31,6 @@ RSpec.describe Ci::Pipeline do
end
end
describe '#with_vulnerabilities scope' do
let!(:pipeline_1) { create(:ci_pipeline, project: project) }
let!(:pipeline_2) { create(:ci_pipeline, project: project) }
let!(:pipeline_3) { create(:ci_pipeline, project: project) }
before do
create(:vulnerabilities_finding, pipelines: [pipeline_1], project: pipeline.project)
create(:vulnerabilities_finding, pipelines: [pipeline_2], project: pipeline.project)
end
it "returns pipeline with vulnerabilities" do
expect(described_class.with_vulnerabilities).to contain_exactly(pipeline_1, pipeline_2)
end
end
describe '#batch_lookup_report_artifact_for_file_type' do
shared_examples '#batch_lookup_report_artifact_for_file_type' do |file_type, license|
context 'when feature is available' 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