[master 3/3] Make sure installer_mode is reset to original value.

mulkieran installerbot-noreply at redhat.com
Fri Apr 10 16:01:49 UTC 2015


From: mulhern <amulhern at redhat.com>

Signed-off-by: mulhern <amulhern at redhat.com>
---
 tests/formats_test/selinux_test.py | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/tests/formats_test/selinux_test.py b/tests/formats_test/selinux_test.py
index 0c9d4c1..516e07f 100755
--- a/tests/formats_test/selinux_test.py
+++ b/tests/formats_test/selinux_test.py
@@ -17,6 +17,10 @@ class SELinuxContextTestCase(loopbackedtestcase.LoopBackedTestCase):
     def __init__(self, methodName='runTest'):
         super(SELinuxContextTestCase, self).__init__(methodName=methodName, deviceSpec=[Size("100 MiB")])
 
+    def setUp(self):
+        self.installer_mode = blivet.flags.installer_mode
+        super(SELinuxContextTestCase, self).setUp()
+
     def testMountingExt2FS(self):
         """ Test that lost+found directory gets assigned correct SELinux
             context if installer_mode is True, and retains some random old
@@ -79,5 +83,9 @@ def testMountingXFS(self):
         an_fs.unmount()
         os.rmdir(mountpoint)
 
+    def tearDown(self):
+        super(SELinuxContextTestCase, self).tearDown()
+        blivet.flags.installer_mode = self.installer_mode
+
 if __name__ == "__main__":
     unittest.main()


-- 
To view this commit on github, visit https://github.com/rhinstaller/blivet/commit/6d5cc55590a06d449a64ab2ce8d8204afead1f96


More information about the anaconda-patches mailing list