2020-02-05 16:09:02 -05:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
RSpec.configure do |config|
|
|
|
|
config.after(:each, :redis) do
|
|
|
|
Sidekiq.redis do |connection|
|
|
|
|
connection.redis.flushdb
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
config.around(:each, :clean_gitlab_redis_cache) do |example|
|
|
|
|
redis_cache_cleanup!
|
|
|
|
|
|
|
|
example.run
|
|
|
|
|
|
|
|
redis_cache_cleanup!
|
|
|
|
end
|
|
|
|
|
|
|
|
config.around(:each, :clean_gitlab_redis_shared_state) do |example|
|
|
|
|
redis_shared_state_cleanup!
|
|
|
|
|
|
|
|
example.run
|
|
|
|
|
|
|
|
redis_shared_state_cleanup!
|
|
|
|
end
|
|
|
|
|
|
|
|
config.around(:each, :clean_gitlab_redis_queues) do |example|
|
|
|
|
redis_queues_cleanup!
|
|
|
|
|
|
|
|
example.run
|
|
|
|
|
|
|
|
redis_queues_cleanup!
|
|
|
|
end
|
2021-06-10 11:10:14 -04:00
|
|
|
|
|
|
|
config.around(:each, :clean_gitlab_redis_trace_chunks) do |example|
|
|
|
|
redis_trace_chunks_cleanup!
|
|
|
|
|
|
|
|
example.run
|
|
|
|
|
|
|
|
redis_trace_chunks_cleanup!
|
|
|
|
end
|
2021-09-30 14:11:31 -04:00
|
|
|
|
|
|
|
config.around(:each, :clean_gitlab_redis_rate_limiting) do |example|
|
|
|
|
redis_rate_limiting_cleanup!
|
|
|
|
|
|
|
|
example.run
|
|
|
|
|
|
|
|
redis_rate_limiting_cleanup!
|
|
|
|
end
|
2021-10-15 11:10:09 -04:00
|
|
|
|
|
|
|
config.around(:each, :clean_gitlab_redis_sessions) do |example|
|
|
|
|
redis_sessions_cleanup!
|
|
|
|
|
|
|
|
example.run
|
|
|
|
|
|
|
|
redis_sessions_cleanup!
|
|
|
|
end
|
2020-02-05 16:09:02 -05:00
|
|
|
end
|