Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/support/helpers/stub_feature_flags.rb')
-rw-r--r--spec/support/helpers/stub_feature_flags.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/spec/support/helpers/stub_feature_flags.rb b/spec/support/helpers/stub_feature_flags.rb
index f1654e55b7e..e301e29afc2 100644
--- a/spec/support/helpers/stub_feature_flags.rb
+++ b/spec/support/helpers/stub_feature_flags.rb
@@ -37,6 +37,10 @@ module StubFeatureFlags
# Enable `ci_live_trace` feature flag only on the specified projects.
def stub_feature_flags(features)
features.each do |feature_name, actors|
+ unless Feature::Definition.get(feature_name)
+ ActiveSupport::Deprecation.warn "Invalid Feature Flag #{feature_name} stubbed"
+ end
+
# Remove feature flag overwrite
feature = Feature.get(feature_name) # rubocop:disable Gitlab/AvoidFeatureGet
feature.remove