Fixes in tests and CAS API due to the change with by-id devices paths

Signed-off-by: Katarzyna Lapinska <katarzyna.lapinska@intel.com>
This commit is contained in:
Katarzyna Lapinska
2021-01-15 11:50:33 +01:00
parent 3acb51c922
commit 87f68bb2f5
12 changed files with 42 additions and 42 deletions

View File

@@ -188,18 +188,19 @@ def base_prepare(item):
# stop only those RAIDs, which are comprised of test disks
if all(map(lambda device:
any(map(lambda disk_path:
disk_path in device.path,
[bd.path for bd in TestRun.dut.disks])),
disk_path in device.get_device_id(),
[bd.get_device_id() for bd in TestRun.dut.disks])),
raid.array_devices)):
raid.umount_all_partitions()
raid.remove_partitions()
raid.stop()
for device in raid.array_devices:
Mdadm.zero_superblock(device.path)
Mdadm.zero_superblock(os.path.join('/dev', device.get_device_id()))
Udev.settle()
for disk in TestRun.dut.disks:
disk.umount_all_partitions()
Mdadm.zero_superblock(disk.path)
Mdadm.zero_superblock(os.path.join('/dev', disk.get_device_id()))
TestRun.executor.run_expect_success("udevadm settle")
disk.remove_partitions()
create_partition_table(disk, PartitionTable.gpt)