Commit 592cff5b authored by Sean McGivern's avatar Sean McGivern

Merge branch '343279-ignore-finding-evidence-summary' into 'master'

Ignore Finding Evidence summary column

See merge request gitlab-org/gitlab!78314
parents b292b07c d7b12cfa
......@@ -3,15 +3,17 @@
module Vulnerabilities
class Finding
class Evidence < ApplicationRecord
include IgnorableColumns
self.table_name = 'vulnerability_finding_evidences'
ignore_column :summary, remove_with: '14.9', remove_after: '2022-03-17'
belongs_to :finding,
class_name: 'Vulnerabilities::Finding',
inverse_of: :finding_evidence,
foreign_key: 'vulnerability_occurrence_id',
optional: false
validates :summary, length: { maximum: 8_000_000 }
validates :data, length: { maximum: 16_000_000 }, presence: true
end
end
......
......@@ -3,7 +3,6 @@
FactoryBot.define do
factory :vulnerabilties_finding_evidence, class: 'Vulnerabilities::Finding::Evidence' do
finding { association :vulnerabilities_finding }
summary { 'Evidence summary' }
data do
{
summary: 'Credit card detected',
......
......@@ -3,7 +3,6 @@
require 'spec_helper'
RSpec.describe Vulnerabilities::Finding::Evidence do
it { is_expected.to validate_length_of(:summary).is_at_most(8_000_000) }
it { is_expected.to validate_presence_of(:data) }
it { is_expected.to validate_length_of(:data).is_at_most(16_000_000) }
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