summaryrefslogtreecommitdiff
path: root/spec/lib/gitlab/sidekiq_cluster
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-03-17 21:09:16 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-03-17 21:09:16 +0000
commit154b9bae142ba15fec753f44327654595094b879 (patch)
tree027f8ae024961778d5b00c77a72fe302f985d4f3 /spec/lib/gitlab/sidekiq_cluster
parent2c156e3c7bbade01c36eee18327f1ced6eebea79 (diff)
downloadgitlab-ce-154b9bae142ba15fec753f44327654595094b879.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/lib/gitlab/sidekiq_cluster')
-rw-r--r--spec/lib/gitlab/sidekiq_cluster/cli_spec.rb22
1 files changed, 13 insertions, 9 deletions
diff --git a/spec/lib/gitlab/sidekiq_cluster/cli_spec.rb b/spec/lib/gitlab/sidekiq_cluster/cli_spec.rb
index 8b31b8ade68..5bda8ff8c72 100644
--- a/spec/lib/gitlab/sidekiq_cluster/cli_spec.rb
+++ b/spec/lib/gitlab/sidekiq_cluster/cli_spec.rb
@@ -36,11 +36,13 @@ describe Gitlab::SidekiqCluster::CLI do
end
it 'allows the special * selector' do
+ worker_queues = %w(foo bar baz)
+
+ expect(Gitlab::SidekiqConfig::CliMethods)
+ .to receive(:worker_queues).and_return(worker_queues)
+
expect(Gitlab::SidekiqCluster)
- .to receive(:start).with(
- [Gitlab::SidekiqConfig::CliMethods.worker_queues],
- default_options
- )
+ .to receive(:start).with([worker_queues], default_options)
cli.run(%w(*))
end
@@ -157,15 +159,17 @@ describe Gitlab::SidekiqCluster::CLI do
.with([['chat_notification'], ['project_export']], default_options)
.and_return([])
- cli.run(%w(--experimental-queue-selector feature_category=chatops&urgency=high resource_boundary=memory&feature_category=importers))
+ cli.run(%w(--experimental-queue-selector feature_category=chatops&has_external_dependencies=true resource_boundary=memory&feature_category=importers))
end
it 'allows the special * selector' do
+ worker_queues = %w(foo bar baz)
+
+ expect(Gitlab::SidekiqConfig::CliMethods)
+ .to receive(:worker_queues).and_return(worker_queues)
+
expect(Gitlab::SidekiqCluster)
- .to receive(:start).with(
- [Gitlab::SidekiqConfig::CliMethods.worker_queues],
- default_options
- )
+ .to receive(:start).with([worker_queues], default_options)
cli.run(%w(--experimental-queue-selector *))
end