Override DUT's disks in conftest.
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
This commit is contained in:
parent
1ffe1dd0a2
commit
9c31e15d48
@ -16,6 +16,7 @@ from api.cas import installer
|
|||||||
from api.cas import casadm
|
from api.cas import casadm
|
||||||
from api.cas import git
|
from api.cas import git
|
||||||
from test_utils.os_utils import Udev
|
from test_utils.os_utils import Udev
|
||||||
|
from test_tools.disk_utils import PartitionTable, create_partition_table
|
||||||
from log.logger import create_log, Log
|
from log.logger import create_log, Log
|
||||||
from test_utils.singleton import Singleton
|
from test_utils.singleton import Singleton
|
||||||
|
|
||||||
@ -181,6 +182,11 @@ def base_prepare(item):
|
|||||||
except Exception:
|
except Exception:
|
||||||
pass # TODO: Reboot DUT if test is executed remotely
|
pass # TODO: Reboot DUT if test is executed remotely
|
||||||
|
|
||||||
|
for disk in TestRun.dut.disks:
|
||||||
|
disk.umount_all_partitions()
|
||||||
|
if not create_partition_table(disk, PartitionTable.gpt):
|
||||||
|
TestRun.exception(f"Failed to remove partitions from {disk}")
|
||||||
|
|
||||||
if get_force_param(item) and not TestRun.plugins['opencas'].already_updated:
|
if get_force_param(item) and not TestRun.plugins['opencas'].already_updated:
|
||||||
installer.reinstall_opencas()
|
installer.reinstall_opencas()
|
||||||
elif not installer.check_if_installed():
|
elif not installer.check_if_installed():
|
||||||
|
Loading…
Reference in New Issue
Block a user