[master 21/22] Add checks for filesystem availability in selinux tests.
mulkieran
installerbot-noreply at redhat.com
Tue May 5 16:35:45 UTC 2015
From: mulhern <amulhern at redhat.com>
Related: #12
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 516e07f..b5c62eb 100755
--- a/tests/formats_test/selinux_test.py
+++ b/tests/formats_test/selinux_test.py
@@ -28,6 +28,10 @@ def testMountingExt2FS(self):
"""
LOST_AND_FOUND_CONTEXT = 'system_u:object_r:lost_found_t:s0'
an_fs = fs.Ext2FS(device=self.loopDevices[0], label="test")
+
+ if not an_fs.formattable or not an_fs.mountable:
+ self.skipTest("can not create or mount filesystem %s" % an_fs.name)
+
self.assertIsNone(an_fs.create())
blivet.flags.installer_mode = False
@@ -61,6 +65,10 @@ def testMountingExt2FS(self):
def testMountingXFS(self):
""" XFS does not have a lost+found directory. """
an_fs = fs.XFS(device=self.loopDevices[0], label="test")
+
+ if not an_fs.formattable or not an_fs.mountable:
+ self.skipTest("can not create or mount filesystem %s" % an_fs.name)
+
self.assertIsNone(an_fs.create())
blivet.flags.installer_mode = False
--
To view this commit on github, visit https://github.com/rhinstaller/blivet/commit/d2fccefe0e8d826ac977c5574eae80a5ff34fca5
More information about the anaconda-patches
mailing list