Commit 52280c75 authored by Bob Van Landuyt's avatar Bob Van Landuyt

Merge branch '352632-remove-evidence-feature-flag' into 'master'

Remove read_from_vulnerability_finding_evidence

See merge request gitlab-org/gitlab!82450
parents 09117ea5 73b17f4f
---
name: read_from_vulnerability_finding_evidence
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/79883
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/352632
milestone: '14.8'
type: development
group: group::threat insights
default_enabled: false
...@@ -291,7 +291,7 @@ module Vulnerabilities ...@@ -291,7 +291,7 @@ module Vulnerabilities
end end
def evidence def evidence
evidence_data = finding_evidence.present? && Feature.enabled?(:read_from_vulnerability_finding_evidence) ? finding_evidence.data : metadata.dig('evidence') evidence_data = finding_evidence.present? ? finding_evidence.data : metadata.dig('evidence')
return if evidence_data.nil? return if evidence_data.nil?
......
...@@ -876,31 +876,14 @@ RSpec.describe Vulnerabilities::Finding do ...@@ -876,31 +876,14 @@ RSpec.describe Vulnerabilities::Finding do
context 'with finding_evidence' do context 'with finding_evidence' do
let(:finding_evidence) { build(:vulnerabilties_finding_evidence) } let(:finding_evidence) { build(:vulnerabilties_finding_evidence) }
let(:finding) { finding_evidence.finding } let(:finding) { finding_evidence.finding }
let(:evidence) { finding_evidence.data }
before do before do
finding_evidence.data[:summary] = "finding_evidence Summary" finding_evidence.data[:summary] = "finding_evidence Summary"
finding_evidence.save! finding_evidence.save!
end end
context 'when the read_from_vulnerability_finding_evidence feature flag is off' do include_examples 'evidence schema'
let(:evidence) { finding.metadata['evidence'] }
before do
stub_feature_flags(read_from_vulnerability_finding_evidence: false)
end
include_examples 'evidence schema'
end
context 'when the read_from_vulnerability_finding_evidence feature flag is on' do
let(:evidence) { finding_evidence.data }
before do
stub_feature_flags(read_from_vulnerability_finding_evidence: true)
end
include_examples 'evidence schema'
end
end end
end end
......
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