pytest_mh.utils.auditd
Classes
|
Auditd utilities. |
- class pytest_mh.utils.auditd.Auditd(*args, **kwargs)
Bases:
MultihostUtility[MultihostHost]Auditd utilities.
Collects audit logs and detects AVC denials.
avc_modevalues:ignore: all failures are ignoredwarn: test result category is set to “AVC DENIALS” and the test is marked as such in a test summary, however test outcome and pytest exit code is kept intactfail: test result category is set to “AVC DENIALS” and the test is marked as such in a test summary, if a test outcome ispassedit is set tofailedand pytest will return non-zero exit code
- Parameters:
host (MultihostHost) – Multihost host.
avc_mode (Literal["fail", "warn", "ignore"]) – Action taken when AVC denial is found in audit logs.
avc_filter (str | None, optional) – Regular expression used to filter the AVC denials, defaults to None
- pytest_report_teststatus(report: CollectReport | TestReport, config: Config) tuple[str, str, str | tuple[str, dict[str, bool]]] | None
Report AVC denial error if found and matches requested filter.
- Parameters:
report (pytest.CollectReport | pytest.TestReport) – Pytest report
config (pytest.Config) – Pytest config
- Returns:
Pytest test status
- Return type: