Skip to content

Commit

Permalink
chore: update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
VihasMakwana committed Jul 23, 2024
1 parent c1d4aba commit 9433065
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions metricbeat/module/system/test_system.py
Original file line number Diff line number Diff line change
Expand Up @@ -423,6 +423,9 @@ def test_process(self):

found_cmdline = False
for evt in output:
if evt.get("error", None) is not None:
# errors are non-fatal errors logged by system/process. Ignore and proceed furture
continue
process = evt["system"]["process"]
# Not all process will have 'cmdline' due to permission issues,
# especially on Windows. Therefore we ensure at least some of
Expand Down Expand Up @@ -481,6 +484,9 @@ def test_process_unix(self):
found_env = False
found_cwd = not sys.platform.startswith("linux")
for evt in output:
if evt.get("error", None) is not None:
# errors are non-fatal errors logged by system/process. Ignore and proceed furture
continue
found_cwd |= "working_directory" in evt["process"]

process = evt["system"]["process"]
Expand Down

0 comments on commit 9433065

Please sign in to comment.