diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-11-24 21:14:31 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-11-24 21:14:31 +0300 |
commit | 844eb8879aa445d8a5ee0f2ba3ee1ccf18319ef1 (patch) | |
tree | 051c632f870cbffd93efccda0711b3ae3a5885df /spec/tasks/gitlab | |
parent | b8d516a6876de74b68a800c5b69af9448b0de140 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/tasks/gitlab')
-rw-r--r-- | spec/tasks/gitlab/cleanup_rake_spec.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/tasks/gitlab/cleanup_rake_spec.rb b/spec/tasks/gitlab/cleanup_rake_spec.rb index 16c907ca87c..0291f14fe4e 100644 --- a/spec/tasks/gitlab/cleanup_rake_spec.rb +++ b/spec/tasks/gitlab/cleanup_rake_spec.rb @@ -166,14 +166,14 @@ RSpec.describe 'gitlab:cleanup rake tasks', :silence_stdout do end context 'sessions' do - describe 'gitlab:cleanup:sessions:active_sessions_lookup_keys', :clean_gitlab_redis_shared_state do + describe 'gitlab:cleanup:sessions:active_sessions_lookup_keys', :clean_gitlab_redis_sessions do subject(:rake_task) { run_rake_task('gitlab:cleanup:sessions:active_sessions_lookup_keys') } let!(:user) { create(:user) } let(:existing_session_id) { '5' } before do - Gitlab::Redis::SharedState.with do |redis| + Gitlab::Redis::Sessions.with do |redis| redis.set("session:user:gitlab:#{user.id}:#{existing_session_id}", Marshal.dump(true)) redis.sadd("session:lookup:user:gitlab:#{user.id}", (1..10).to_a) @@ -185,7 +185,7 @@ RSpec.describe 'gitlab:cleanup rake tasks', :silence_stdout do end it 'removes expired active session lookup keys' do - Gitlab::Redis::SharedState.with do |redis| + Gitlab::Redis::Sessions.with do |redis| lookup_key = "session:lookup:user:gitlab:#{user.id}" expect { subject }.to change { redis.scard(lookup_key) }.from(10).to(1) expect(redis.smembers("session:lookup:user:gitlab:#{user.id}")).to( |