mirror of
https://gitlab.com/apparmor/apparmor
synced 2025-09-03 15:55:46 +00:00
ProfileList: add get_all_profiles()
... and a test for it
This commit is contained in:
@@ -508,9 +508,12 @@ class TestGet_profile_and_childs(AATest):
|
||||
self.pl.add_profile('/etc/apparmor.d/bin.foo', 'foo//xy', '/bin/foo//xy', self.dummy_profile)
|
||||
|
||||
expected = ['foo', 'foo//bar', 'foo//xy']
|
||||
|
||||
self.assertEqual(list(self.pl.get_profile_and_childs('foo')), expected)
|
||||
|
||||
# while on it, also test get_all_profiles()
|
||||
all_profiles = ['bafoo', 'foo', 'foobar', 'foo//bar', 'foo//xy']
|
||||
self.assertEqual(list(self.pl.get_all_profiles()), all_profiles)
|
||||
|
||||
|
||||
setup_aa(apparmor.aa)
|
||||
setup_all_loops(__name__)
|
||||
|
Reference in New Issue
Block a user