Skip to content

Commit

Permalink
Add test that no AppArmor denied events are produced (#3912)
Browse files Browse the repository at this point in the history
As discussed in #3885, now that fixed Supervisor is in stable, we can test that
no AppArmor denied events are logged during CI tests.
  • Loading branch information
sairon authored Mar 5, 2025
1 parent a39b8a9 commit 610ced0
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/supervisor_test/test_supervisor.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,13 @@ def test_restore_ssl_directory(shell_json, stash):
logger.info("Backup restore result: %s", result)


@pytest.mark.dependency(depends=["test_start_supervisor"])
def test_no_apparmor_denies(shell):
"""Check there are no AppArmor denies in the logs raised during Supervisor tests."""
output = shell.run_check("journalctl -t audit | grep DENIED || true")
assert not output, f"AppArmor denies found: {output}"


@pytest.mark.dependency(depends=["test_start_supervisor"])
def test_kernel_not_tainted(shell):
"""Check if the kernel is not tainted - do it at the end of the
Expand Down

0 comments on commit 610ced0

Please sign in to comment.