Welcome to mirror list, hosted at ThFree Co, Russian Federation.

every_sidekiq_worker_spec.rb « workers « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 7ee0a51a263d5bb07b64881be433fe3065def340 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
require 'spec_helper'

describe 'Every Sidekiq worker' do
  it 'includes ApplicationWorker' do
    expect(Gitlab::SidekiqConfig.workers).to all(include(ApplicationWorker))
  end

  it 'does not use the default queue' do
    expect(Gitlab::SidekiqConfig.workers.map(&:queue)).not_to include('default')
  end

  it 'uses the cronjob queue when the worker runs as a cronjob' do
    expect(Gitlab::SidekiqConfig.cron_workers.map(&:queue)).to all(eq('cronjob'))
  end

  it 'defines the queue in the Sidekiq configuration file' do
    config_queue_names = Gitlab::SidekiqConfig.config_queues.to_set

    expect(Gitlab::SidekiqConfig.worker_queues).to all(be_in(config_queue_names))
  end
end