diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-09-14 15:12:34 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-09-14 15:12:34 +0300 |
commit | 16daf112d6cfe2c87d8837382a00d88aa8c0ff5c (patch) | |
tree | 017d43acafea2928550fe7c8fdbb7cf36335ba9f /spec/workers/concerns | |
parent | 3cb798d80b6b5235b5f5febaaacef410e75c2963 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/workers/concerns')
-rw-r--r-- | spec/workers/concerns/cluster_agent_queue_spec.rb | 1 | ||||
-rw-r--r-- | spec/workers/concerns/cluster_queue_spec.rb | 21 | ||||
-rw-r--r-- | spec/workers/concerns/cronjob_queue_spec.rb | 4 | ||||
-rw-r--r-- | spec/workers/concerns/gitlab/github_import/queue_spec.rb | 18 | ||||
-rw-r--r-- | spec/workers/concerns/pipeline_background_queue_spec.rb | 21 | ||||
-rw-r--r-- | spec/workers/concerns/pipeline_queue_spec.rb | 21 | ||||
-rw-r--r-- | spec/workers/concerns/repository_check_queue_spec.rb | 4 | ||||
-rw-r--r-- | spec/workers/concerns/waitable_worker_spec.rb | 3 |
8 files changed, 1 insertions, 92 deletions
diff --git a/spec/workers/concerns/cluster_agent_queue_spec.rb b/spec/workers/concerns/cluster_agent_queue_spec.rb index b5189cbd8c8..4f67102a0be 100644 --- a/spec/workers/concerns/cluster_agent_queue_spec.rb +++ b/spec/workers/concerns/cluster_agent_queue_spec.rb @@ -14,6 +14,5 @@ RSpec.describe ClusterAgentQueue do end end - it { expect(worker.queue).to eq('cluster_agent:example') } it { expect(worker.get_feature_category).to eq(:kubernetes_management) } end diff --git a/spec/workers/concerns/cluster_queue_spec.rb b/spec/workers/concerns/cluster_queue_spec.rb deleted file mode 100644 index c03ca9cea48..00000000000 --- a/spec/workers/concerns/cluster_queue_spec.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' - -RSpec.describe ClusterQueue do - let(:worker) do - Class.new do - def self.name - 'DummyWorker' - end - - include ApplicationWorker - include ClusterQueue - end - end - - it 'sets a default pipelines queue automatically' do - expect(worker.sidekiq_options['queue']) - .to eq 'gcp_cluster:dummy' - end -end diff --git a/spec/workers/concerns/cronjob_queue_spec.rb b/spec/workers/concerns/cronjob_queue_spec.rb index 0244535051f..7dd016fc78a 100644 --- a/spec/workers/concerns/cronjob_queue_spec.rb +++ b/spec/workers/concerns/cronjob_queue_spec.rb @@ -40,10 +40,6 @@ RSpec.describe CronjobQueue do stub_const("AnotherWorker", another_worker) end - it 'sets the queue name of a worker' do - expect(worker.sidekiq_options['queue'].to_s).to eq('cronjob:dummy') - end - it 'disables retrying of failed jobs' do expect(worker.sidekiq_options['retry']).to eq(false) end diff --git a/spec/workers/concerns/gitlab/github_import/queue_spec.rb b/spec/workers/concerns/gitlab/github_import/queue_spec.rb deleted file mode 100644 index beca221b593..00000000000 --- a/spec/workers/concerns/gitlab/github_import/queue_spec.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' - -RSpec.describe Gitlab::GithubImport::Queue do - it 'sets the Sidekiq options for the worker' do - worker = Class.new do - def self.name - 'DummyWorker' - end - - include ApplicationWorker - include Gitlab::GithubImport::Queue - end - - expect(worker.sidekiq_options['queue']).to eq('github_importer:dummy') - end -end diff --git a/spec/workers/concerns/pipeline_background_queue_spec.rb b/spec/workers/concerns/pipeline_background_queue_spec.rb deleted file mode 100644 index 77c7e7440c5..00000000000 --- a/spec/workers/concerns/pipeline_background_queue_spec.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' - -RSpec.describe PipelineBackgroundQueue do - let(:worker) do - Class.new do - def self.name - 'DummyWorker' - end - - include ApplicationWorker - include PipelineBackgroundQueue - end - end - - it 'sets a default object storage queue automatically' do - expect(worker.sidekiq_options['queue']) - .to eq 'pipeline_background:dummy' - end -end diff --git a/spec/workers/concerns/pipeline_queue_spec.rb b/spec/workers/concerns/pipeline_queue_spec.rb deleted file mode 100644 index 6c1ac2052e4..00000000000 --- a/spec/workers/concerns/pipeline_queue_spec.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' - -RSpec.describe PipelineQueue do - let(:worker) do - Class.new do - def self.name - 'DummyWorker' - end - - include ApplicationWorker - include PipelineQueue - end - end - - it 'sets a default pipelines queue automatically' do - expect(worker.sidekiq_options['queue']) - .to eq 'pipeline_default:dummy' - end -end diff --git a/spec/workers/concerns/repository_check_queue_spec.rb b/spec/workers/concerns/repository_check_queue_spec.rb index ae377c09b37..08ac73aac7b 100644 --- a/spec/workers/concerns/repository_check_queue_spec.rb +++ b/spec/workers/concerns/repository_check_queue_spec.rb @@ -14,10 +14,6 @@ RSpec.describe RepositoryCheckQueue do end end - it 'sets the queue name of a worker' do - expect(worker.sidekiq_options['queue'].to_s).to eq('repository_check:dummy') - end - it 'disables retrying of failed jobs' do expect(worker.sidekiq_options['retry']).to eq(false) end diff --git a/spec/workers/concerns/waitable_worker_spec.rb b/spec/workers/concerns/waitable_worker_spec.rb index bf156c3b8cb..2df5b60deaf 100644 --- a/spec/workers/concerns/waitable_worker_spec.rb +++ b/spec/workers/concerns/waitable_worker_spec.rb @@ -49,8 +49,7 @@ RSpec.describe WaitableWorker do expect(Gitlab::AppJsonLogger).to( receive(:info).with(a_hash_including('message' => 'running inline', 'class' => 'Gitlab::Foo::Bar::DummyWorker', - 'job_status' => 'running', - 'queue' => 'foo_bar_dummy')) + 'job_status' => 'running')) .once) worker.bulk_perform_and_wait(args_list) |