Commit a22c802a authored by Cameron Swords's avatar Cameron Swords

Added a missing select and fixed a broken test

parent d8d3a8b1
...@@ -38,7 +38,7 @@ module Security ...@@ -38,7 +38,7 @@ module Security
def find_jobs_legacy def find_jobs_legacy
# the query doesn't guarantee accuracy, so we verify it here # the query doesn't guarantee accuracy, so we verify it here
legacy_jobs_query do |job| legacy_jobs_query.select do |job|
@job_types.find { |job_type| job.options.dig(:artifacts, :reports, job_type) } @job_types.find { |job_type| job.options.dig(:artifacts, :reports, job_type) }
end end
end end
......
...@@ -44,7 +44,7 @@ describe Security::JobsFinder do ...@@ -44,7 +44,7 @@ describe Security::JobsFinder do
context 'with jobs having report artifacts that are similar to secure artifacts' do context 'with jobs having report artifacts that are similar to secure artifacts' do
before do before do
create(:ci_build, pipeline: pipeline, options: { artifacts: { reports: { file: 'sast.file' } } }) create(:ci_build, pipeline: pipeline, options: { artifacts: { reports: { file: 'report:sast:result.file' } } })
end end
it { is_expected.to be_empty } it { is_expected.to be_empty }
......
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