summaryrefslogtreecommitdiff
path: root/spec/initializers
diff options
context:
space:
mode:
authorKamil Trzciński <ayufan@ayufan.eu>2018-12-06 20:49:31 +0100
committerKamil Trzciński <ayufan@ayufan.eu>2018-12-06 20:49:31 +0100
commit3560b11922fd180eea5cafd0e763e0e601c5c4ee (patch)
tree6d9c0c285ec80bf983f750937d9c888bfa0283b0 /spec/initializers
parent39c1731a53d1014eab7c876d70632b1abf738712 (diff)
downloadgitlab-ce-3560b11922fd180eea5cafd0e763e0e601c5c4ee.tar.gz
Prefer to use correlation-id in logs
This changes `correlation_id` to be `correlation-id` when passed via jobs
Diffstat (limited to 'spec/initializers')
-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 af54a777373..bf5dde7fe66 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