Commit a9a8fde6 authored by Thiago Figueiró's avatar Thiago Figueiró

Remove vulnerability_location_image_filter feature flag

Changelog: removed
parent 8ce5dfe2
---
name: vulnerability_location_image_filter
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/69867
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/340915
milestone: '14.4'
type: development
group: group::container security
default_enabled: true
...@@ -99,7 +99,7 @@ module Security ...@@ -99,7 +99,7 @@ module Security
# This filter will not work for InstanceSecurityDashboard, because InstanceSecurityDashboard could have multiple projects. # This filter will not work for InstanceSecurityDashboard, because InstanceSecurityDashboard could have multiple projects.
return if vulnerable.is_a?(InstanceSecurityDashboard) return if vulnerable.is_a?(InstanceSecurityDashboard)
if params[:image].present? && Feature.enabled?(:vulnerability_location_image_filter, vulnerable, default_enabled: :yaml) if params[:image].present?
@vulnerabilities = vulnerabilities.with_container_image(params[:image]) @vulnerabilities = vulnerabilities.with_container_image(params[:image])
end end
end end
......
...@@ -165,19 +165,6 @@ RSpec.describe Security::VulnerabilitiesFinder do ...@@ -165,19 +165,6 @@ RSpec.describe Security::VulnerabilitiesFinder do
let(:filters) { { image: [finding.location['image']] } } let(:filters) { { image: [finding.location['image']] } }
let(:feature_enabled) { true } let(:feature_enabled) { true }
before do
stub_feature_flags(vulnerability_location_image_filter: feature_enabled)
end
context 'when vulnerability_location_image_filter is disabled' do
let(:feature_enabled) { false }
it 'does not include cluster vulnerability' do
is_expected.not_to contain_exactly(cluster_vulnerability)
end
end
context 'when vulnerability_location_image_filter is enabled' do
it 'only returns vulnerabilities matching the given image' do it 'only returns vulnerabilities matching the given image' do
is_expected.to contain_exactly(cluster_vulnerability) is_expected.to contain_exactly(cluster_vulnerability)
end end
...@@ -189,7 +176,6 @@ RSpec.describe Security::VulnerabilitiesFinder do ...@@ -189,7 +176,6 @@ RSpec.describe Security::VulnerabilitiesFinder do
is_expected.to be_empty is_expected.to be_empty
end end
end end
end
context 'when vulnerable is InstanceSecurityDashboard' do context 'when vulnerable is InstanceSecurityDashboard' do
let(:vulnerable) { InstanceSecurityDashboard.new(project.users.first) } let(:vulnerable) { InstanceSecurityDashboard.new(project.users.first) }
......
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