[apparmor] [patch] Update comments in minitools_test.py
Christian Boltz
apparmor at cboltz.de
Sun May 31 17:58:26 UTC 2015
Hello,
After switching to winbindd as test profile, comments about the ntpd
profile don't make sense anymore ;-)
The patch also includes a whitespace fix.
[ 43-update-comments-in-minitools_test.py.diff ]
=== modified file utils/test/minitools_test.py
--- utils/test/minitools_test.py 2015-05-29 12:59:09.219227339 +0200
+++ utils/test/minitools_test.py 2015-05-31 19:45:33.730815706 +0200
@@ -33,21 +33,21 @@
class Test(unittest.TestCase):
def test_audit(self):
- #Set ntpd profile to audit mode and check if it was correctly set
+ #Set test profile to audit mode and check if it was correctly set
str(subprocess.check_output('%s ./../aa-audit --no-reload -d ./profiles %s'%(python_interpreter, test_path), shell=True))
self.assertEqual(apparmor.get_profile_flags(local_profilename, test_path), 'audit', 'Audit flag could not be set in profile %s'%local_profilename)
- #Remove audit mode from ntpd profile and check if it was correctly removed
+ #Remove audit mode from test profile and check if it was correctly removed
subprocess.check_output('%s ./../aa-audit --no-reload -d ./profiles -r %s'%(python_interpreter, test_path), shell=True)
self.assertEqual(apparmor.get_profile_flags(local_profilename, test_path), None, 'Audit flag could not be removed in profile %s'%local_profilename)
def test_complain(self):
- #Set ntpd profile to complain mode and check if it was correctly set
+ #Set test profile to complain mode and check if it was correctly set
subprocess.check_output('%s ./../aa-complain --no-reload -d ./profiles %s'%(python_interpreter, test_path), shell=True)
-
+
# "manually" create a force-complain symlink (will be deleted by aa-enforce later)
if not os.path.isdir('./profiles/force-complain'):
os.mkdir('./profiles/force-complain')
@@ -56,7 +56,7 @@
self.assertEqual(os.path.islink('./profiles/force-complain/%s'%os.path.basename(local_profilename)), True, 'Failed to create a symlink for %s in force-complain'%local_profilename)
self.assertEqual(apparmor.get_profile_flags(local_profilename, test_path), 'complain', 'Complain flag could not be set in profile %s'%local_profilename)
- #Set ntpd profile to enforce mode and check if it was correctly set
+ #Set test profile to enforce mode and check if it was correctly set
subprocess.check_output('%s ./../aa-enforce --no-reload -d ./profiles %s'%(python_interpreter, test_path), shell=True)
self.assertEqual(os.path.islink('./profiles/force-complain/%s'%os.path.basename(local_profilename)), False, 'Failed to remove symlink for %s from force-complain'%local_profilename)
@@ -83,9 +83,9 @@
subprocess.check_output('%s ./../aa-audit --no-reload -d ./profiles -r %s'%(python_interpreter, test_path), shell=True)
def test_enforce(self):
- #Set ntpd profile to complain mode and check if it was correctly set
+ #Set test profile to complain mode and check if it was correctly set
- #Set ntpd profile to enforce mode and check if it was correctly set
+ #Set test profile to enforce mode and check if it was correctly set
subprocess.check_output('%s ./../aa-enforce --no-reload -d ./profiles %s'%(python_interpreter, test_path), shell=True)
self.assertEqual(os.path.islink('./profiles/force-complain/%s'%os.path.basename(local_profilename)), False, 'Failed to remove symlink for %s from force-complain'%local_profilename)
@@ -94,7 +94,7 @@
def test_disable(self):
- #Disable the ntpd profile and check if it was correctly disabled
+ #Disable the test profile and check if it was correctly disabled
subprocess.check_output('%s ./../aa-disable --no-reload -d ./profiles %s'%(python_interpreter, test_path), shell=True)
self.assertEqual(os.path.islink('./profiles/disable/%s'%os.path.basename(local_profilename)), True, 'Failed to create a symlink for %s in disable'%local_profilename)
Regards,
Christian Boltz
--
Es ist Fakt, dass ein Bug ziemlich oft zwischen Stuhllehne und
Tastatur sitzt. [Thomas Hertweck in suse-linux]
More information about the AppArmor
mailing list