Skip to content

Draft: Inherit user metadata to lint factories example groups

Peter Leitzen requested to merge pl-lint-factories-contexts into master

What does this MR do and why?

Since we create an isolated, detached, top-level example group to lint factories per model, metadata is not inherited.

However, some model specs need special setup like :saas or :with_license tags which are usually set on the model's example group.

We now also inherit feature_category tags!

Let's inherit these user metadata. This way we don't need to pass :saas and :with_license tags for all factory lints.

This might reduce flaky specs: #478114 (closed)

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

How to set up and validate locally

  1. Run bin/rspec --seed 19390 './spec/models/draft_note_spec.rb[1:2:4:1:2]' './spec/lib/banzai/filter/references/design_reference_filter_spec.rb[1:7:1:1,1:7:2:1,1:7:3:1,1:7:4:1,1:10:2:1,1:11:1,1:12:2:1,1:12:5,1:12:6]' --format documentation
  2. Run bin/rspec ee/spec/models/gitlab_subscription_spec.rb -E 'Lint factories for.*gitlab_subscription'
Edited by Peter Leitzen

Merge request reports

Loading