Commit ce274fd6 authored by Grzegorz Bizon's avatar Grzegorz Bizon

Make it possible to check if worker uses a known queue

parent 0f01ce36
......@@ -27,6 +27,7 @@
- [new_merge_request, 2]
- [build, 2]
- [pipeline, 2]
- [pipelines-pipeline-processing, 2]
- [gitlab_shell, 2]
- [email_receiver, 2]
- [emails_on_push, 2]
......
shared_examples 'sidekiq worker' do
let(:queues) do
YAML.load_file(Rails.root.join('config', 'sidekiq_queues.yml'))
.fetch(:queues, []).map(&:first)
end
it 'is going to be processed inside a known sidekiq queue' do
expect(described_class.sidekiq_options['queue']).to be_in queues
end
end
require 'spec_helper'
describe PipelineUpdateWorker do
it_behaves_like 'sidekiq worker'
describe '#perform' do
context 'when pipeline exists' do
let(:pipeline) { create(:ci_pipeline) }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment