Commit b8ee0f3e authored by Heinrich Lee Yu's avatar Heinrich Lee Yu

Merge branch '332719-fix-scanner-bug' into 'master'

Fix scanner comparison error

See merge request gitlab-org/gitlab!66322
parents 508c0491 e582ef4f
......@@ -39,7 +39,7 @@ module Gitlab
end
def <=>(other)
sort_keys <=> other.sort_keys
sort_keys.compact <=> other.sort_keys.compact
end
protected
......
......@@ -110,6 +110,7 @@ RSpec.describe Gitlab::Ci::Reports::Security::Scanner do
{ external_id: 'gemnasium-python', name: 'foo', vendor: 'bar' } | { external_id: 'bandit', name: 'foo', vendor: 'bar' } | 1
{ external_id: 'bandit', name: 'foo', vendor: 'bar' } | { external_id: 'semgrep', name: 'foo', vendor: 'bar' } | -1
{ external_id: 'semgrep', name: 'foo', vendor: 'bar' } | { external_id: 'unknown', name: 'foo', vendor: 'bar' } | -1
{ external_id: 'gemnasium', name: 'foo', vendor: 'bar' } | { external_id: 'gemnasium', name: 'foo', vendor: nil } | 1
end
with_them 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