Disk finder refactor
Signed-off-by: Katarzyna Treder <katarzyna.treder@h-partners.com>
This commit is contained in:
@@ -25,7 +25,6 @@ from storage_devices.raid import Raid
|
||||
from storage_devices.ramdisk import RamDisk
|
||||
from test_tools.os_tools import kill_all_io
|
||||
from test_tools.udev import Udev
|
||||
from test_utils.disk_finder import get_disk_serial_number
|
||||
from test_tools.disk_utils import PartitionTable, create_partition_table
|
||||
from test_tools.device_mapper import DeviceMapper
|
||||
from test_tools.mdadm import Mdadm
|
||||
@@ -34,6 +33,7 @@ from test_tools import initramfs, git
|
||||
from log.logger import create_log, Log
|
||||
from test_utils.common.singleton import Singleton
|
||||
from storage_devices.lvm import Lvm, LvmConfiguration
|
||||
from storage_devices.disk import Disk
|
||||
|
||||
|
||||
def pytest_addoption(parser):
|
||||
@@ -185,7 +185,7 @@ def base_prepare(item):
|
||||
|
||||
RamDisk.remove_all()
|
||||
for disk in TestRun.disks.values():
|
||||
disk_serial = get_disk_serial_number(disk.path)
|
||||
disk_serial = Disk.get_disk_serial_number(disk.path)
|
||||
if disk.serial_number and disk.serial_number != disk_serial:
|
||||
raise Exception(
|
||||
f"Serial for {disk.path} doesn't match the one from the config."
|
||||
|
||||
Reference in New Issue
Block a user