Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/services/web_hook_service_spec.rb')
-rw-r--r--spec/services/web_hook_service_spec.rb22
1 files changed, 12 insertions, 10 deletions
diff --git a/spec/services/web_hook_service_spec.rb b/spec/services/web_hook_service_spec.rb
index 9465fe7f0d6..5f53d6f34d8 100644
--- a/spec/services/web_hook_service_spec.rb
+++ b/spec/services/web_hook_service_spec.rb
@@ -375,15 +375,18 @@ RSpec.describe WebHookService do
it 'does not queue a worker and logs an error' do
expect(WebHookWorker).not_to receive(:perform_async)
- payload = {
- message: 'Webhook rate limit exceeded',
- hook_id: project_hook.id,
- hook_type: 'ProjectHook',
- hook_name: 'push_hooks'
- }
-
- expect(Gitlab::AuthLogger).to receive(:error).with(payload)
- expect(Gitlab::AppLogger).to receive(:error).with(payload)
+ expect(Gitlab::AuthLogger).to receive(:error).with(
+ include(
+ message: 'Webhook rate limit exceeded',
+ hook_id: project_hook.id,
+ hook_type: 'ProjectHook',
+ hook_name: 'push_hooks',
+ "correlation_id" => kind_of(String),
+ "meta.project" => project.full_path,
+ "meta.related_class" => 'ProjectHook',
+ "meta.root_namespace" => project.root_namespace.full_path
+ )
+ )
service_instance.async_execute
end
@@ -403,7 +406,6 @@ RSpec.describe WebHookService do
it 'stops queueing workers and logs errors' do
expect(Gitlab::AuthLogger).to receive(:error).twice
- expect(Gitlab::AppLogger).to receive(:error).twice
2.times { service_instance.async_execute }
end