diff --git a/spec/01-unit/26-observability/05-logs_spec.lua b/spec/01-unit/26-observability/05-logs_spec.lua index 05b9ca2856dd..fa79a1af1aba 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"])