From 6f94ca47e06be761a84accdcd46dbaff90b7feaa Mon Sep 17 00:00:00 2001 From: samugi Date: Thu, 4 Jul 2024 10:13:20 +0200 Subject: [PATCH] fixup! tests(opentelemetry): OTel formatted logs --- spec/01-unit/26-observability/05-logs_spec.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/01-unit/26-observability/05-logs_spec.lua b/spec/01-unit/26-observability/05-logs_spec.lua index 05b9ca2856dda..fa79a1af1abaf 100644 --- a/spec/01-unit/26-observability/05-logs_spec.lua +++ b/spec/01-unit/26-observability/05-logs_spec.lua @@ -67,13 +67,13 @@ describe("Observability/Logs unit tests", function() local log_level = ngx.WARN local body = "Careful! I'm a warning!" - maybe_push(1, log_level, body) + maybe_push(1, log_level, body, true, 123, ngx.null, nil, function()end, { foo = "bar" }) local worker_logs = get_worker_logs() assert.equals(1, #worker_logs) local logged_entry = worker_logs[1] assert.same(log_level, logged_entry.log_level) - assert.same(body, logged_entry.body) + assert.matches(body .. "true123nilnilfunction:%s0x%x+table:%s0x%x+", logged_entry.body) assert.is_table(logged_entry.attributes) assert.is_number(logged_entry.attributes["introspection.current.line"]) assert.is_string(logged_entry.attributes["introspection.name"])