Skip to content
Snippets Groups Projects
Commit 144d35eb authored by Jonathan Schafer's avatar Jonathan Schafer
Browse files

Disable Vulnerability Finding Link creation

Changelog: changed
EE: true
parent ae3ce141
No related branches found
No related tags found
1 merge request!68381Disable finding link creation
......@@ -48,7 +48,7 @@ def create_all_vulnerabilities!
create_vulnerability_finding(vulnerability_findings_by_uuid, finding)&.id
end.compact.uniq
update_vulnerability_links_info
update_vulnerability_links_info if Feature.enabled?(:vulnerability_finding_replace_metadata)
create_vulnerability_pipeline_objects
update_vulnerabilities_identifiers
update_vulnerabilities_finding_identifiers
......
......@@ -67,6 +67,16 @@
expect { subject }.to change { Vulnerabilities::FindingLink.count }.by(finding_links)
end
context 'when finding links creation is disabled' do
before do
stub_feature_flags(vulnerability_finding_replace_metadata: false)
end
it 'does not insert finding links' do
expect { subject }.not_to change { Vulnerabilities::FindingLink.count }
end
end
it 'inserts all finding identifiers (join model)' do
expect { subject }.to change { Vulnerabilities::FindingIdentifier.count }.by(finding_identifiers)
end
......@@ -550,7 +560,7 @@ def vulnerability_finding_id_to_finding_map
let!(:issue_link) { create(:vulnerabilities_issue_link, issue: issue, vulnerability_id: vulnerability.id) }
it 'will not raise an error' do
expect { subject }.not_to raise_error(ActiveRecord::RecordInvalid)
expect { subject }.not_to raise_error
end
it 'does not insert issue link from the new pipeline' do
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment