diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-07-20 12:55:51 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-07-20 12:55:51 +0300 |
commit | e8d2c2579383897a1dd7f9debd359abe8ae8373d (patch) | |
tree | c42be41678c2586d49a75cabce89322082698334 /spec/services/user_project_access_changed_service_spec.rb | |
parent | fc845b37ec3a90aaa719975f607740c22ba6a113 (diff) |
Add latest changes from gitlab-org/gitlab@14-1-stable-eev14.1.0-rc42
Diffstat (limited to 'spec/services/user_project_access_changed_service_spec.rb')
-rw-r--r-- | spec/services/user_project_access_changed_service_spec.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/services/user_project_access_changed_service_spec.rb b/spec/services/user_project_access_changed_service_spec.rb index 4723619afd2..f8835fefc84 100644 --- a/spec/services/user_project_access_changed_service_spec.rb +++ b/spec/services/user_project_access_changed_service_spec.rb @@ -30,6 +30,17 @@ RSpec.describe UserProjectAccessChangedService do described_class.new([1, 2]).execute(blocking: false, priority: described_class::LOW_PRIORITY) end + + it 'sets the current caller_id as related_class in the context of all the enqueued jobs' do + Gitlab::ApplicationContext.with_context(caller_id: 'Foo') do + described_class.new([1, 2]).execute(blocking: false, + priority: described_class::LOW_PRIORITY) + end + + expect(AuthorizedProjectUpdate::UserRefreshFromReplicaWorker.jobs).to all( + include(Labkit::Context.log_key(:related_class) => 'Foo') + ) + end end context 'with load balancing enabled' do |