Warn on invalid feature flag stubs
What does this MR do and why?
Warns the developer if they are stubbing an undefined feature flag.
This protects against issues where the flag is removed but some test scenarios for the flag remain. This also protects against typos.
Ideally we will raise an error but we need to fix existing offenses first:
Screenshots or screen recordings
gitlab/gdk/gitlab ab-warn-invlid-stub ✗ 21h26m ⚑
▶ bin/rspec spec/requests/api/maven_packages_spec.rb:441
warning: parser/current is loading parser/ruby27, which recognizes2.7.6-compliant syntax, but you are running 2.7.5.
Please see https://github.com/whitequark/parser#compatibility-with-ruby-mri.
Run options: include {:focus=>true, :locations=>{"./spec/requests/api/maven_packages_spec.rb"=>[441]}}
Test environment set up in 5.965709 seconds
Invalid Feature Flag check_maven_path_first stubbed
.Invalid Feature Flag check_maven_path_first stubbed
[fog][WARNING] Your region 'gdk' does not match the default region 'us-east-1'
.Invalid Feature Flag check_maven_path_first stubbed
.Invalid Feature Flag check_maven_path_first stubbed
.Invalid Feature Flag check_maven_path_first stubbed
[fog][WARNING] Your region 'gdk' does not match the default region 'us-east-1'
.Invalid Feature Flag check_maven_path_first stubbed
[fog][WARNING] Your region 'gdk' does not match the default region 'us-east-1'
.Invalid Feature Flag check_maven_path_first stubbed
.Invalid Feature Flag check_maven_path_first stubbed
.Invalid Feature Flag check_maven_path_first stubbed
[fog][WARNING] Your region 'gdk' does not match the default region 'us-east-1'
.Invalid Feature Flag check_maven_path_first stubbed
[fog][WARNING] Your region 'gdk' does not match the default region 'us-east-1'
.Invalid Feature Flag check_maven_path_first stubbed
.Invalid Feature Flag check_maven_path_first stubbed
.
Finished in 15.6 seconds (files took 24.21 seconds to load)
12 examples, 0 failures
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Allison Browne