Skip to content

Commit

Permalink
chg: [test] improve logarchive test
Browse files Browse the repository at this point in the history
  • Loading branch information
cvandeplas committed Jun 12, 2024
1 parent a2593c0 commit ef81a77
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/test_parsers_logarchive.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import platform
import tempfile
import unittest
import json


class TestParsersLogarchive(SysdiagnoseTestCase):
Expand All @@ -24,6 +25,10 @@ def test_get_logs_outputdir(self):
self.assertTrue(os.path.isfile(os.path.join(tmp_outpath, "logarchive", "logarchive.json")))
else:
self.assertTrue(os.path.isfile(os.path.join(tmp_outpath, "logarchive", "liveData.json")))
with open(os.path.join(tmp_outpath, "logarchive", "liveData.json"), 'r') as f:
for line in f:
json_data = json.loads(line)
self.assertTrue('subsystem' in json_data)

def test_get_logs_result(self):
for log_root_path in self.log_root_paths:
Expand Down

0 comments on commit ef81a77

Please sign in to comment.