summaryrefslogtreecommitdiff
path: root/spec/lib/gitlab/sidekiq_versioning/manager_spec.rb
blob: 84161d9236efb6a637c6e81fa5fc22635fb229d8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# frozen_string_literal: true

require 'spec_helper'

RSpec.describe Gitlab::SidekiqVersioning::Manager do
  before do
    Sidekiq::Manager.prepend described_class
  end

  describe '#initialize' do
    it 'listens on all expanded queues' do
      manager = Sidekiq::Manager.new(queues: %w[post_receive repository_fork cronjob unknown])

      queues = manager.options[:queues]

      expect(queues).to include('post_receive')
      expect(queues).to include('repository_fork')
      expect(queues).to include('cronjob')
      expect(queues).to include('cronjob:import_stuck_project_import_jobs')
      expect(queues).to include('cronjob:jira_import_stuck_jira_import_jobs')
      expect(queues).to include('cronjob:stuck_merge_jobs')
      expect(queues).to include('unknown')
    end
  end
end