Remove :vulnerabilities_occurrence alias from Vulnerabilities::Finding factory
The following discussions from !36280 (merged) should be addressed:
-
@drewcimino started a discussion: (+1 comment) I checked out the issues in the epic, and didn't see anything about getting rid of the alias in
spec/factories/vulnerabilities/findings.rb
factory :vulnerabilities_finding, class: 'Vulnerabilities::Finding', aliases: [:vulnerabilities_occurrence] do
and changing all the usages. I don't know what the urgency is, but I'd at least make an issue so we remember to do it eventually.
Implementation plan
-
backend remove alias from ee/spec/factories/vulnerabilities/findings.rb
-
backend update all specs and fixtures and rename vulnerabilities_occurrence
tovulnerabilities_finding
:
⋊> ag ':vulnerabilities_occurrence' -l 17:52:34
ee/spec/migrations/update_occurrence_severity_column_spec.rb
ee/spec/migrations/update_undefined_confidence_from_occurrences_spec.rb
ee/spec/migrations/update_cs_vulnerability_confidence_column_spec.rb
ee/spec/models/ee/vulnerability_spec.rb
ee/spec/presenters/vulnerabilities/finding_presenter_spec.rb
ee/spec/requests/api/vulnerabilities_spec.rb
ee/spec/requests/api/graphql/vulnerabilities/scanner_spec.rb
ee/spec/requests/api/graphql/vulnerabilities/primary_identifier_spec.rb
ee/spec/requests/api/graphql/vulnerabilities/location_spec.rb
ee/spec/serializers/vulnerabilities/finding_entity_spec.rb
ee/spec/serializers/vulnerabilities/request_entity_spec.rb
ee/spec/serializers/vulnerabilities/response_entity_spec.rb
ee/spec/graphql/resolvers/vulnerabilities/scanners_resolver_spec.rb
ee/spec/lib/ee/gitlab/background_migration/remove_undefined_occurrence_severity_level_spec.rb
ee/spec/lib/ee/gitlab/background_migration/remove_undefined_occurrence_confidence_level_spec.rb
ee/spec/lib/ee/gitlab/background_migration/update_vulnerability_confidence_spec.rb
ee/spec/controllers/projects/security/vulnerabilities_controller_spec.rb
ee/spec/helpers/vulnerabilities_helper_spec.rb
ee/spec/services/vulnerabilities/create_service_spec.rb
ee/spec/services/vulnerabilities/update_service_spec.rb
ee/db/fixtures/development/20_vulnerabilities.rb
Edited by Alan (Maciej) Paruszewski