jack-ullery / AppAnvil

Graphical user interface for the AppArmor security module (in-progress)
GNU General Public License v3.0
17 stars 12 forks source link

Updating Logs and Logs tests #15

Closed shayr80 closed 2 years ago

shayr80 commented 2 years ago

Updated aa-caller to use journalctl instead of dmesg, updated Logs class to correctly parse logs obtained using journalctl, and updated LogsTest class unit tests to reflect changes made to Logs class

jack-ullery commented 2 years ago

Excellent work!

I made a few small changes before merging:

I noticed the LogsTest.TEST_FORMAT_TIMESTAMP can be brittle. It fails when the tester is not in the Eastern Timezone. We may want to change the test (or mock localtime() in Logs::format_timestamp()) to fix this problem.