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/session_helpers.rb')
-rw-r--r--spec/support/helpers/session_helpers.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/support/helpers/session_helpers.rb b/spec/support/helpers/session_helpers.rb
index 394a401afca..5554695a27d 100644
--- a/spec/support/helpers/session_helpers.rb
+++ b/spec/support/helpers/session_helpers.rb
@@ -39,4 +39,10 @@ module SessionHelpers
def get_ttl(key)
Gitlab::Redis::Sessions.with { |redis| redis.ttl(key) }
end
+
+ def expire_session
+ get_session_keys.each do |key|
+ ::Gitlab::Redis::Sessions.with { |redis| redis.expire(key, -1) }
+ end
+ end
end