Skip Feature.enabled? override in test environment
What does this MR do and why?
Skip Feature.enabled? override in test environment
The enable_introspection_feature_flags rake task overrides Feature.enabled? with a singleton method, but this breaks the test environment where StubbedFeature is prepended and calls super. Skipping the override in tests prevents polluting the test environment and causing flaky tests.
References
Screenshots or screen recordings
| Before | After |
|---|---|
How to set up and validate locally
Before this MR, the following execution failed, because Feature.enabled? is still overriden and would return true:
bundle exec rspec spec/tasks/gitlab/graphql_introspection_rake_spec.rb spec/models/work_items/types_filter_spec.rb
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Edited by Nicolas Dular