mirror of
https://gitlab.com/apparmor/apparmor
synced 2025-08-31 06:16:03 +00:00
Skip test if it can not access /var/log/wtmp
utils/test/test-aa-notify.py:
Change `AANotifyTest.test_entries_since_login()` to be decorated by a
`skipUnless()` checking for existence of **/var/log/wtmp** (similar to
`AANotifyTest.test_entries_since_login_verbose()`).
The test otherwise fails trying to access /var/log/wtmp in environments
where the file is not available.
Fixes https://gitlab.com/apparmor/apparmor/-/issues/120
MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/641
(cherry picked from commit e0200b1b16
)
Signed-off-by: John Johansen <john.johansen@canonical.com>
This commit is contained in:
committed by
John Johansen
parent
b73b8ed432
commit
526c902ba2
@@ -189,6 +189,7 @@ optional arguments:
|
||||
result = 'Got output "%s", expected "%s"\n' % (output, expected_output_has)
|
||||
self.assertIn(expected_output_has, output, result + output)
|
||||
|
||||
@unittest.skipUnless(os.path.isfile('/var/log/wtmp'), 'Requires wtmp on system')
|
||||
def test_entries_since_login(self):
|
||||
'''Test showing log entries since last login'''
|
||||
|
||||
|
Reference in New Issue
Block a user