2019-08-22 06:57:44 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2017-11-28 11:16:50 -05:00
|
|
|
require 'spec_helper'
|
|
|
|
|
2020-06-24 14:09:03 -04:00
|
|
|
RSpec.describe Gitlab::SidekiqVersioning::Manager do
|
2017-11-28 11:16:50 -05:00
|
|
|
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')
|
2020-06-08 14:08:27 -04:00
|
|
|
expect(queues).to include('cronjob:import_stuck_project_import_jobs')
|
2020-05-29 14:08:26 -04:00
|
|
|
expect(queues).to include('cronjob:jira_import_stuck_jira_import_jobs')
|
2017-11-28 11:16:50 -05:00
|
|
|
expect(queues).to include('cronjob:stuck_merge_jobs')
|
|
|
|
expect(queues).to include('unknown')
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|