diff options
Diffstat (limited to 'spec/support/redis/redis_helpers.rb')
-rw-r--r-- | spec/support/redis/redis_helpers.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/support/redis/redis_helpers.rb b/spec/support/redis/redis_helpers.rb index 3511d906203..f27d873eb31 100644 --- a/spec/support/redis/redis_helpers.rb +++ b/spec/support/redis/redis_helpers.rb @@ -22,4 +22,14 @@ module RedisHelpers def redis_trace_chunks_cleanup! Gitlab::Redis::TraceChunks.with(&:flushdb) end + + # Usage: rate limiting state (for Rack::Attack) + def redis_rate_limiting_cleanup! + Gitlab::Redis::RateLimiting.with(&:flushdb) + end + + # Usage: session state + def redis_sessions_cleanup! + Gitlab::Redis::Sessions.with(&:flushdb) + end end |