Skip to content

Commit

Permalink
[Filebeat][nosetests] Printing error message when test_modules.py ret…
Browse files Browse the repository at this point in the history
…urns an error message from ES (elastic#20460)
  • Loading branch information
P1llus authored Aug 6, 2020
1 parent adddc89 commit f3fe010
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions filebeat/tests/system/test_modules.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,8 @@ def run_on_file(self, module, fileset, test_file, cfgfile):
# the event was ingested to Elasticsearch
assert "ingested" in obj["event"], "missing event.ingested timestamp"

assert "error" not in obj, "not error expected but got: {}".format(
obj)
assert "error" not in obj, "not error expected but got: {}.\n The related error message is: {}".format(
obj, obj["error"].get("message"))

if (module == "auditd" and fileset == "log") \
or (module == "osquery" and fileset == "result"):
Expand Down

0 comments on commit f3fe010

Please sign in to comment.