Add test/audit

Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
Jan Lindemann 2022-12-14 11:12:27 +01:00
commit b5d849ce44
4 changed files with 805 additions and 0 deletions

14
test/audit/test.py Normal file
View file

@ -0,0 +1,14 @@
#!/usr/bin/python3
from jwutils.misc import multi_regex_edit
from jwutils.log import *
from devtest.os.test.cases import Audit as TestCase
if __name__ == '__main__':
set_level(INFO)
refpath = 'ausearch.log.ref'
fake_input = 'ausearch.log.fake-input'
with open(fake_input, "r") as f:
lines = f.readlines()
features = set(['polp'])
print(TestCase(refpath, write_response=True).test(lines, features))