tests.devices_test package¶
Submodules¶
tests.devices_test.dependencies_test module¶
- class tests.devices_test.dependencies_test.DeviceDependenciesTestCase(methodName='runTest')¶
Bases:
unittest.case.TestCaseTest external device dependencies.
Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.
- test_dependencies()¶
- class tests.devices_test.dependencies_test.MissingWeakDependenciesTestCase(methodName='runTest')¶
Bases:
unittest.case.TestCaseCreate an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.
- load_all_plugins()¶
- setUp()¶
Hook method for setting up the test fixture before exercising it.
- test_weak_dependencies()¶
- unload_all_plugins()¶
- class tests.devices_test.dependencies_test.MockingDeviceDependenciesTestCase1(methodName='runTest')¶
Bases:
unittest.case.TestCaseTest availability of external device dependencies.
Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.
- setUp()¶
Hook method for setting up the test fixture before exercising it.
- test_availability_mdraidplugin()¶
- class tests.devices_test.dependencies_test.MockingDeviceDependenciesTestCase2(methodName='runTest')¶
Bases:
unittest.case.TestCaseCreate an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.
- test_dependencies_handling()¶
tests.devices_test.device_methods_test module¶
- class tests.devices_test.device_methods_test.DiskDeviceMethodsTestCase(methodName='runTest')¶
Bases:
tests.devices_test.device_methods_test.StorageDeviceMethodsTestCaseCreate an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.
- device_class¶
alias of
blivet.devices.disk.DiskDevice
- test_create()¶
- test_destroy()¶
- class tests.devices_test.device_methods_test.LVMLogicalVolumeDeviceMethodsTestCase(methodName='runTest')¶
Bases:
tests.devices_test.device_methods_test.StorageDeviceMethodsTestCaseCreate an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.
- property destroy_calls_udev_settle¶
- device_class¶
- test_create()¶
- test_destroy()¶
- test_setup(*args)¶
- test_teardown(*args)¶
- class tests.devices_test.device_methods_test.LVMVolumeGroupDeviceMethodsTestCase(methodName='runTest')¶
Bases:
tests.devices_test.device_methods_test.StorageDeviceMethodsTestCaseCreate an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.
- property destroy_calls_udev_settle¶
- device_class¶
- set_patches()¶
- test_create()¶
- test_destroy()¶
- test_teardown()¶
- class tests.devices_test.device_methods_test.MDRaidArrayDeviceMethodsTestCase(methodName='runTest')¶
Bases:
tests.devices_test.device_methods_test.StorageDeviceMethodsTestCaseCreate an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.
- device_class¶
alias of
blivet.devices.md.MDRaidArrayDevice
- set_patches()¶
- property teardown_method_mock¶
- test_create()¶
- test_setup()¶
- test_teardown()¶
- class tests.devices_test.device_methods_test.PartitionDeviceMethodsTestCase(methodName='runTest')¶
Bases:
tests.devices_test.device_methods_test.StorageDeviceMethodsTestCaseCreate an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.
- device_class¶
- set_patches()¶
- test_create(*args)¶
- test_destroy()¶
- class tests.devices_test.device_methods_test.StorageDeviceMethodsTestCase(methodName='runTest')¶
Bases:
unittest.case.TestCaseCreate an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.
- property create_calls_udev_settle¶
- property create_updates_sysfs_path¶
- property destroy_calls_udev_settle¶
- property destroy_updates_sysfs_path¶
- device_class¶
alias of
blivet.devices.storage.StorageDevice
- setUp()¶
Hook method for setting up the test fixture before exercising it.
- set_patches()¶
- property setup_calls_udev_settle¶
- property setup_updates_sysfs_path¶
- start_patches()¶
- stop_patches()¶
- property teardown_calls_udev_settle¶
- property teardown_method_mock¶
- property teardown_updates_sysfs_path¶
- test_create()¶
- test_destroy()¶
- test_setup()¶
- test_teardown()¶
tests.devices_test.device_names_test module¶
- class tests.devices_test.device_names_test.DeviceNameTestCase(methodName='runTest')¶
Bases:
unittest.case.TestCaseTest device name validation
Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.
- test_logical_volume()¶
- test_storage_device(*patches)¶
- test_volume_group()¶
tests.devices_test.device_packages_test module¶
- class tests.devices_test.device_packages_test.DevicePackagesTestCase(methodName='runTest')¶
Bases:
unittest.case.TestCaseTest device name validation
Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.
- test_packages()¶
tests.devices_test.device_properties_test module¶
- class tests.devices_test.device_properties_test.BTRFSDeviceTestCase(methodName='run_test')¶
Bases:
tests.devices_test.device_properties_test.DeviceStateTestCaseNote that these tests postdate the code that they test. Therefore, they capture the behavior of the code as it is now, not necessarily its intended or correct behavior. See the initial commit message for this file for further details.
Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.
- setUp()¶
Hook method for setting up the test fixture before exercising it.
- test_btrfsdevice_init()¶
Tests the state of a BTRFSDevice after initialization. For some combinations of arguments the initializer will throw an exception.
- test_btrfsdevice_methods()¶
Test for method calls on initialized BTRFS Devices.
- test_btrfssnap_shot_device_init()¶
- class tests.devices_test.device_properties_test.DeviceStateTestCase(methodName='run_test')¶
Bases:
unittest.case.TestCaseA class which implements a simple method of checking the state of a device object.
Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.
- state_check(device, **kwargs)¶
Checks the current state of a device by means of its fields or properties.
Every kwarg should be a key which is a field or property of a Device and a value which is a function of two parameters and should call the appropriate assert* functions. These values override those in the state_functions dict.
If the value is None, then the test starts the debugger instead.
- test_resizable()¶
Test resizable property of unformatted devices.
- class tests.devices_test.device_properties_test.LVMLogicalVolumeDeviceTestCase(methodName='run_test')¶
Bases:
tests.devices_test.device_properties_test.DeviceStateTestCaseCreate an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.
- setUp()¶
Hook method for setting up the test fixture before exercising it.
- test_lvmlogical_volume_device_init()¶
- test_lvmlogical_volume_device_init_cached()¶
- class tests.devices_test.device_properties_test.MDRaidArrayDeviceTestCase(methodName='run_test')¶
Bases:
tests.devices_test.device_properties_test.DeviceStateTestCaseNote that these tests postdate the code that they test. Therefore, they capture the behavior of the code as it is now, not necessarily its intended or correct behavior. See the initial commit message for this file for further details.
Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.
- setUp()¶
Hook method for setting up the test fixture before exercising it.
- test_mdraid_array_device_init()¶
Tests the state of a MDRaidArrayDevice after initialization. For some combinations of arguments the initializer will throw an exception.
- test_mdraid_array_device_methods()¶
Test for method calls on initialized MDRaidDevices.
- tests.devices_test.device_properties_test.xform(func)¶
Simple wrapper function that transforms a function that takes a precalculated value and a message to a function that takes a device and an attribute name, evaluates the attribute, and passes the value and the attribute name as the message to the original function.
- Parameters
func ((object * str) -> None) – The function to be transformed.
- Returns
a function that gets the attribute and passes it to func
- Return type
(object * str) -> None
tests.devices_test.disk_test module¶
- class tests.devices_test.disk_test.DiskDeviceRAIDPropertiesTestCase(methodName='runTest')¶
Bases:
unittest.case.TestCaseCreate an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.
- test_disk_raid_properties()¶
tests.devices_test.lvm_test module¶
- class tests.devices_test.lvm_test.BlivetLVMConfigureActionsTest(methodName='runTest')¶
Bases:
unittest.case.TestCaseCreate an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.
- test_lv_rename()¶
- test_vg_rename()¶
- class tests.devices_test.lvm_test.BlivetLVMVDODependenciesTest(methodName='runTest')¶
Bases:
unittest.case.TestCaseCreate an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.
- test_vdo_dependencies()¶
- test_vdo_dependencies_devicefactory()¶
- class tests.devices_test.lvm_test.BlivetNewLVMCachePoolDeviceTest(methodName='runTest')¶
Bases:
unittest.case.TestCaseCreate an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.
- test_new_cache_pool()¶
- class tests.devices_test.lvm_test.BlivetNewLVMDeviceTest(methodName='runTest')¶
Bases:
unittest.case.TestCaseCreate an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.
- test_new_lv_from_lvs()¶
- test_new_lv_from_non_existing_lvs()¶
- class tests.devices_test.lvm_test.BlivetNewLVMVDODeviceTest(methodName='runTest')¶
Bases:
unittest.case.TestCaseCreate an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.
- test_new_vdo_pool()¶
- class tests.devices_test.lvm_test.LVMDeviceTest(methodName='runTest')¶
Bases:
unittest.case.TestCaseCreate an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.
- test_add_remove_pv()¶
- test_lvm_inconsistent_sector_size()¶
- test_lvm_logical_volume_insuf_seg_type()¶
- test_lvm_logical_volume_metadata_size()¶
- test_lvm_logical_volume_mirror()¶
- test_lvm_logical_volume_pv_free_cached()¶
- test_lvm_logical_volume_pv_free_linear()¶
- test_lvm_logical_volume_raid0()¶
- test_lvm_logical_volume_raid_level()¶
- test_lvm_logical_volume_segtype_init()¶
- test_lvm_logical_volume_segtype_pv_free()¶
- test_lvm_logical_volume_with_pvs_init()¶
- test_lvm_vdo_pool()¶
- test_lvmcached_logical_volume_init()¶
- test_lvmcached_two_logical_volume_init()¶
- test_lvmsnap_shot_device_init()¶
- test_lvmthin_snap_shot_device_init()¶
- test_lvmthinpool_chunk_size()¶
- test_skip_activate()¶
- test_target_size()¶
- test_vg_is_empty()¶
- class tests.devices_test.lvm_test.TypeSpecificCallsTest(methodName='runTest')¶
Bases:
unittest.case.TestCaseCreate an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.
- test_type_specific_calls()¶
tests.devices_test.md_test module¶
- class tests.devices_test.md_test.MDRaidArrayDeviceTest(methodName='runTest')¶
Bases:
unittest.case.TestCaseCreate an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.
- test_chunk_size1()¶
- test_chunk_size2()¶
tests.devices_test.network_test module¶
- class tests.devices_test.network_test.FakeNetDev(*args, **kwargs)¶
Bases:
blivet.devices.storage.StorageDevice,blivet.devices.network.NetworkStorageDevice- Parameters
name (str) – the device name (generally a device node’s basename)
exists (bool) – does this device exist?
size (
Size) – the device’s sizeparents (list of
StorageDevice) – a list of parent devicesfmt (
DeviceFormator a subclass of it) – this device’s formattinguuid (str) – universally unique identifier (device – not fs)
sysfs_path (str) – sysfs device path
major (int) – the device major
minor (int) – the device minor
serial (str) – the ID_SERIAL_SHORT for this device
vendor (str) – the manufacturer of this Device
model (str) – manufacturer’s device model string
bus (str) – the interconnect this device uses
- class tests.devices_test.network_test.NetDevMountOptionTestCase(methodName='runTest')¶
Bases:
unittest.case.TestCaseCreate an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.
- test_net_dev_setting()¶
Verify netdev mount option setting after format assignment.
- test_net_dev_update()¶
Verify netdev mount option setting after device creation.
- test_net_dev_update_remove()¶
Verify netdev mount option is removed after removing the netdev parent.
- test_net_device_manual()¶
Verify netdev mount option is not removed if explicitly set by the user.
tests.devices_test.partition_test module¶
- class tests.devices_test.partition_test.PartitionDeviceTestCase(methodName='runTest')¶
Bases:
unittest.case.TestCaseCreate an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.
- test_ctor_parted_partition_error_handling()¶
- test_disk_is_empty()¶
- test_extended_min_size()¶
- test_min_max_size_alignment()¶
- test_target_size()¶
- test_weight_1(*patches)¶
- test_weight_2()¶
- class tests.devices_test.partition_test.Weighted(fstype, mountpoint, true_funcs, weight)¶
Bases:
tupleCreate new instance of Weighted(fstype, mountpoint, true_funcs, weight)
- fstype¶
Alias for field number 0
- mountpoint¶
Alias for field number 1
- true_funcs¶
Alias for field number 2
- weight¶
Alias for field number 3
tests.devices_test.size_test module¶
- class tests.devices_test.size_test.LUKSDeviceSizeTest(methodName='runTest')¶
Bases:
tests.devices_test.size_test.StorageDeviceSizeTestCreate an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.
- test_size_getter()¶
- class tests.devices_test.size_test.StorageDeviceSizeTest(methodName='runTest')¶
Bases:
unittest.case.TestCaseCreate an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.
- test_size_getter()¶
- test_size_setter()¶
tests.devices_test.stratis_test module¶
- class tests.devices_test.stratis_test.BlivetNewStratisDeviceTest(methodName='runTest')¶
Bases:
unittest.case.TestCaseCreate an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.
- test_new_encryted_stratis()¶
- test_new_stratis()¶