test-conftest: move dict creation outside loop function
Signed-off-by: Kamil Gierszewski <kamil.gierszewski@huawei.com>
This commit is contained in:
parent
677a5019fb
commit
e54732ef81
@ -170,9 +170,9 @@ def base_prepare(item):
|
|||||||
|
|
||||||
raids = Raid.discover()
|
raids = Raid.discover()
|
||||||
if len(TestRun.disks):
|
if len(TestRun.disks):
|
||||||
|
test_run_disk_ids = {dev.device_id for dev in TestRun.disks.values()}
|
||||||
for raid in raids:
|
for raid in raids:
|
||||||
# stop only those RAIDs, which are comprised of test disks
|
# stop only those RAIDs, which are comprised of test disks
|
||||||
test_run_disk_ids = {dev.device_id for dev in TestRun.disks.values()}
|
|
||||||
if filter(lambda dev: dev.device_id in test_run_disk_ids, raid.array_devices):
|
if filter(lambda dev: dev.device_id in test_run_disk_ids, raid.array_devices):
|
||||||
raid.remove_partitions()
|
raid.remove_partitions()
|
||||||
raid.unmount()
|
raid.unmount()
|
||||||
|
Loading…
Reference in New Issue
Block a user