diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-12-14 15:13:33 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-12-14 15:13:33 +0300 |
commit | 79a7da2537e94c34aba92ad4b9a5dc1da431b2c4 (patch) | |
tree | 83b6a53a15a9266ca2e2aca061dd3f33d5282b1f /spec/lib/gitlab/redis | |
parent | a58667ab4b4fc4b0d1e47e95d91c27ccadd0acd3 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/lib/gitlab/redis')
-rw-r--r-- | spec/lib/gitlab/redis/sessions_spec.rb | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/spec/lib/gitlab/redis/sessions_spec.rb b/spec/lib/gitlab/redis/sessions_spec.rb index ecd77564360..a6a0373a4bb 100644 --- a/spec/lib/gitlab/redis/sessions_spec.rb +++ b/spec/lib/gitlab/redis/sessions_spec.rb @@ -44,20 +44,23 @@ RSpec.describe Gitlab::Redis::Sessions do describe '#store' do subject { described_class.store(namespace: described_class::SESSION_NAMESPACE) } - context 'when redis.sessions configuration is provided' do + context 'when redis.sessions configuration is NOT provided' do it 'instantiates ::Redis instance' do expect(described_class).to receive(:config_fallback?).and_return(true) expect(subject).to be_instance_of(::Redis::Store) end end - context 'when redis.sessions configuration is not provided' do + context 'when redis.sessions configuration is provided' do + before do + allow(described_class).to receive(:config_fallback?).and_return(false) + end + it 'instantiates an instance of MultiStore' do - expect(described_class).to receive(:config_fallback?).and_return(false) expect(subject).to be_instance_of(::Gitlab::Redis::MultiStore) end - end - it_behaves_like 'multi store feature flags', :use_primary_and_secondary_stores_for_sessions, :use_primary_store_as_default_for_sessions + it_behaves_like 'multi store feature flags', :use_primary_and_secondary_stores_for_sessions, :use_primary_store_as_default_for_sessions + end end end |