Skip to content
代码片段 群组 项目
提交 0f8a49c7 编辑于 作者: Sean McGivern's avatar Sean McGivern
浏览文件

Merge branch 'sc1-test-recursive-ff' into 'master'

Add specs to catch recursive feature-flag requests

See merge request https://gitlab.com/gitlab-org/gitlab/-/merge_requests/106534



Merged-by: default avatarSean McGivern <sean@gitlab.com>
Approved-by: default avatarThong Kuah <tkuah@gitlab.com>
Approved-by: default avatarSean McGivern <sean@gitlab.com>
Co-authored-by: default avatarschin1 <schin@gitlab.com>
No related branches found
No related tags found
无相关合并请求
......@@ -162,6 +162,13 @@
stub_feature_flag_definition(:enabled_feature_flag, default_enabled: true)
end
context 'when using redis cache', :use_clean_rails_redis_caching do
it 'does not make recursive feature-flag calls' do
expect(described_class).to receive(:enabled?).once.and_call_original
described_class.enabled?(:disabled_feature_flag)
end
end
context 'when self-recursive' do
before do
allow(Feature).to receive(:with_feature).and_wrap_original do |original, name, &block|
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册