debian-mirror-gitlab/spec/lib/gitlab/sidekiq_versioning_spec.rb

20 lines
499 B
Ruby
Raw Normal View History

2019-12-04 20:38:33 +05:30
# frozen_string_literal: true
2018-03-17 18:26:18 +05:30
require 'spec_helper'
2022-10-11 01:57:18 +05:30
RSpec.describe Gitlab::SidekiqVersioning, :clean_gitlab_redis_queues do
2018-03-17 18:26:18 +05:30
before do
2022-10-11 01:57:18 +05:30
allow(Gitlab::SidekiqConfig).to receive(:worker_queues).and_return(%w[foo bar])
2018-03-17 18:26:18 +05:30
end
describe '.install!' do
it 'registers all versionless and versioned queues with Redis' do
described_class.install!
queues = Sidekiq::Queue.all.map(&:name)
expect(queues).to include('foo')
expect(queues).to include('bar')
end
end
end