summaryrefslogtreecommitdiff
path: root/spec/support/sidekiq.rb
blob: d143014692da3ba6c15554263c788366fd1dad67 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
require 'sidekiq/testing/inline'

Sidekiq::Testing.server_middleware do |chain|
  chain.add Gitlab::SidekiqStatus::ServerMiddleware
end

RSpec.configure do |config|
  config.after(:each, :sidekiq) do
    Sidekiq::Worker.clear_all
  end

  config.after(:each, :sidekiq, :redis) do
    Sidekiq.redis { |redis| redis.flushdb }
  end
end