From add7a455a13e23e58f94c87383775c11d48bd847 Mon Sep 17 00:00:00 2001 From: Vihas Makwana Date: Tue, 23 Jul 2024 19:13:54 +0530 Subject: [PATCH] fix: unit test --- metricbeat/module/system/test_system.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/metricbeat/module/system/test_system.py b/metricbeat/module/system/test_system.py index de113e5e4b0e..c61598566bad 100644 --- a/metricbeat/module/system/test_system.py +++ b/metricbeat/module/system/test_system.py @@ -388,6 +388,9 @@ def test_process_summary(self): for evt in output: self.assert_fields_are_documented(evt) + if evt.get("error", None) is not None: + # errors are non-fatal errors logged by system/process. Ignore and proceed furture + continue summary = evt["system"]["process"]["summary"] assert isinstance(summary["total"], int)