diff options
Diffstat (limited to 'spec/lib/gitlab/sidekiq_middleware/worker_context')
-rw-r--r-- | spec/lib/gitlab/sidekiq_middleware/worker_context/client_spec.rb | 8 | ||||
-rw-r--r-- | spec/lib/gitlab/sidekiq_middleware/worker_context/server_spec.rb | 6 |
2 files changed, 7 insertions, 7 deletions
diff --git a/spec/lib/gitlab/sidekiq_middleware/worker_context/client_spec.rb b/spec/lib/gitlab/sidekiq_middleware/worker_context/client_spec.rb index 1b6cd7ac5fb..4fbc64a45d6 100644 --- a/spec/lib/gitlab/sidekiq_middleware/worker_context/client_spec.rb +++ b/spec/lib/gitlab/sidekiq_middleware/worker_context/client_spec.rb @@ -123,7 +123,7 @@ RSpec.describe Gitlab::SidekiqMiddleware::WorkerContext::Client do context 'when the feature category is already set in the surrounding block' do it 'takes the feature category from the worker, not the caller' do - Gitlab::ApplicationContext.with_context(feature_category: 'authentication_and_authorization') do + Gitlab::ApplicationContext.with_context(feature_category: 'system_access') do TestWithContextWorker.bulk_perform_async_with_contexts( %w(job1 job2), arguments_proc: -> (name) { [name, 1, 2, 3] }, @@ -139,7 +139,7 @@ RSpec.describe Gitlab::SidekiqMiddleware::WorkerContext::Client do end it 'takes the feature category from the caller if the worker is not owned' do - Gitlab::ApplicationContext.with_context(feature_category: 'authentication_and_authorization') do + Gitlab::ApplicationContext.with_context(feature_category: 'system_access') do TestNotOwnedWithContextWorker.bulk_perform_async_with_contexts( %w(job1 job2), arguments_proc: -> (name) { [name, 1, 2, 3] }, @@ -150,8 +150,8 @@ RSpec.describe Gitlab::SidekiqMiddleware::WorkerContext::Client do job1 = TestNotOwnedWithContextWorker.job_for_args(['job1', 1, 2, 3]) job2 = TestNotOwnedWithContextWorker.job_for_args(['job2', 1, 2, 3]) - expect(job1['meta.feature_category']).to eq('authentication_and_authorization') - expect(job2['meta.feature_category']).to eq('authentication_and_authorization') + expect(job1['meta.feature_category']).to eq('system_access') + expect(job2['meta.feature_category']).to eq('system_access') end end end diff --git a/spec/lib/gitlab/sidekiq_middleware/worker_context/server_spec.rb b/spec/lib/gitlab/sidekiq_middleware/worker_context/server_spec.rb index 2deab3064eb..eb077a0371c 100644 --- a/spec/lib/gitlab/sidekiq_middleware/worker_context/server_spec.rb +++ b/spec/lib/gitlab/sidekiq_middleware/worker_context/server_spec.rb @@ -69,7 +69,7 @@ RSpec.describe Gitlab::SidekiqMiddleware::WorkerContext::Server do context 'feature category' do it 'takes the feature category from the worker' do - Gitlab::ApplicationContext.with_context(feature_category: 'authentication_and_authorization') do + Gitlab::ApplicationContext.with_context(feature_category: 'system_access') do TestWorker.perform_async('identifier', 1) end @@ -78,11 +78,11 @@ RSpec.describe Gitlab::SidekiqMiddleware::WorkerContext::Server do context 'when the worker is not owned' do it 'takes the feature category from the surrounding context' do - Gitlab::ApplicationContext.with_context(feature_category: 'authentication_and_authorization') do + Gitlab::ApplicationContext.with_context(feature_category: 'system_access') do NotOwnedWorker.perform_async('identifier', 1) end - expect(NotOwnedWorker.contexts['identifier']).to include('meta.feature_category' => 'authentication_and_authorization') + expect(NotOwnedWorker.contexts['identifier']).to include('meta.feature_category' => 'system_access') end end end |