From: mulhern amulhern@redhat.com
Related: #12
Signed-off-by: mulhern amulhern@redhat.com --- tests/action_test.py | 9 +++++++++ tests/clearpart_test.py | 6 ++++++ tests/devices_test/lvm_test.py | 11 +++++++++++ 3 files changed, 26 insertions(+)
diff --git a/tests/action_test.py b/tests/action_test.py index f030153..c370886 100644 --- a/tests/action_test.py +++ b/tests/action_test.py @@ -24,6 +24,15 @@ from blivet.deviceaction import ActionAddMember from blivet.deviceaction import ActionRemoveMember
+DEVICE_CLASSES = [ + DiskDevice, + PartitionDevice, + MDRaidArrayDevice, + LVMVolumeGroupDevice, + LVMLogicalVolumeDevice +] + +@unittest.skipUnless(all(not x.unavailableTypeDependencies() for x in DEVICE_CLASSES), "some unsupported device classes required for this test") class DeviceActionTestCase(StorageTestCase): """ DeviceActionTestSuite """
diff --git a/tests/clearpart_test.py b/tests/clearpart_test.py index 80d43ee..830a37a 100644 --- a/tests/clearpart_test.py +++ b/tests/clearpart_test.py @@ -6,6 +6,12 @@ from parted import PARTITION_NORMAL from blivet.flags import flags
+DEVICE_CLASSES = [ + blivet.devices.DiskDevice, + blivet.devices.PartitionDevice +] + +@unittest.skipUnless(all(not x.unavailableTypeDependencies() for x in DEVICE_CLASSES), "some unsupported device classes required for this test") class ClearPartTestCase(unittest.TestCase): def setUp(self): flags.testing = True diff --git a/tests/devices_test/lvm_test.py b/tests/devices_test/lvm_test.py index 12f0807..7cdfcc9 100644 --- a/tests/devices_test/lvm_test.py +++ b/tests/devices_test/lvm_test.py @@ -14,6 +14,17 @@ from blivet.devices import LVMVolumeGroupDevice from blivet.size import Size
+DEVICE_CLASSES = [ + LVMLogicalVolumeDevice, + LVMSnapShotDevice, + LVMThinLogicalVolumeDevice, + LVMThinPoolDevice, + LVMThinSnapShotDevice, + LVMVolumeGroupDevice, + StorageDevice +] + +@unittest.skipUnless(all(not x.unavailableTypeDependencies() for x in DEVICE_CLASSES), "some unsupported device classes required for this test") class LVMDeviceTest(unittest.TestCase): def testLVMSnapShotDeviceInit(self): pv = StorageDevice("pv1", fmt=blivet.formats.getFormat("lvmpv"),