summaryrefslogtreecommitdiff
path: root/spec/initializers/lograge_spec.rb
diff options
context:
space:
mode:
authorKamil Trzciński <ayufan@ayufan.eu>2018-12-06 21:46:31 +0100
committerKamil Trzciński <ayufan@ayufan.eu>2018-12-06 21:46:31 +0100
commitebb5d9f4db3c2d5818f5efda1b09fcd1be7285e8 (patch)
tree5d51a48a32a92fdedf7b907a32caa172d1c0d923 /spec/initializers/lograge_spec.rb
parent3560b11922fd180eea5cafd0e763e0e601c5c4ee (diff)
downloadgitlab-ce-ebb5d9f4db3c2d5818f5efda1b09fcd1be7285e8.tar.gz
Revert "Prefer to use correlation-id in logs"
This reverts commit 3560b11922fd180eea5cafd0e763e0e601c5c4ee.
Diffstat (limited to 'spec/initializers/lograge_spec.rb')
-rw-r--r--spec/initializers/lograge_spec.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/initializers/lograge_spec.rb b/spec/initializers/lograge_spec.rb
index bf5dde7fe66..af54a777373 100644
--- a/spec/initializers/lograge_spec.rb
+++ b/spec/initializers/lograge_spec.rb
@@ -11,7 +11,7 @@ describe 'lograge', type: :request do
it 'logs to api_json log' do
# we assert receiving parameters by grape logger
expect_any_instance_of(Gitlab::GrapeLogging::Formatters::LogrageWithTimestamp).to receive(:call)
- .with(anything, anything, anything, a_hash_including("correlation-id" => "new-correlation-id"))
+ .with(anything, anything, anything, a_hash_including("correlation_id" => "new-correlation-id"))
.and_call_original
subject
@@ -24,12 +24,12 @@ describe 'lograge', type: :request do
it 'logs to production_json log' do
# formatter receives a hash with correlation id
expect(Lograge.formatter).to receive(:call)
- .with(a_hash_including("correlation-id" => "new-correlation-id"))
+ .with(a_hash_including("correlation_id" => "new-correlation-id"))
.and_call_original
# a log file receives a line with correlation id
expect(Lograge.logger).to receive(:send)
- .with(anything, include('"correlation-id":"new-correlation-id"'))
+ .with(anything, include('"correlation_id":"new-correlation-id"'))
.and_call_original
subject