summaryrefslogtreecommitdiff
path: root/spec/workers/concerns
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2017-08-21 13:05:01 +0200
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2017-08-21 13:05:01 +0200
commit0f01ce365731542570c9135d7cbf6390ffa42ced (patch)
tree7361c1248383482594a70c5c8ec667954bf8bd1c /spec/workers/concerns
parent6509833cfa211804048ec4711572e3b44a5be21c (diff)
downloadgitlab-ce-0f01ce365731542570c9135d7cbf6390ffa42ced.tar.gz
Extend pipelines queue mixin and add a default queue
Diffstat (limited to 'spec/workers/concerns')
-rw-r--r--spec/workers/concerns/pipeline_queue_spec.rb14
1 files changed, 12 insertions, 2 deletions
diff --git a/spec/workers/concerns/pipeline_queue_spec.rb b/spec/workers/concerns/pipeline_queue_spec.rb
index 40794d0e42a..3049f2b2ab4 100644
--- a/spec/workers/concerns/pipeline_queue_spec.rb
+++ b/spec/workers/concerns/pipeline_queue_spec.rb
@@ -8,7 +8,17 @@ describe PipelineQueue do
end
end
- it 'sets the queue name of a worker' do
- expect(worker.sidekiq_options['queue'].to_s).to eq('pipeline')
+ it 'sets a default pipelines queue automatically' do
+ expect(worker.sidekiq_options['queue'])
+ .to eq 'pipelines-default'
+ end
+
+ describe '.enqueue_in' do
+ it 'sets a custom sidekiq queue with prefix, name and group' do
+ worker.enqueue_in(queue: :build, group: :processing)
+
+ expect(worker.sidekiq_options['queue'])
+ .to eq 'pipelines-build-processing'
+ end
end
end