diff --git a/test/functional/config/example_dut_config.yml b/test/functional/config/example_dut_config.yml index b595c9b..46f5c9d 100644 --- a/test/functional/config/example_dut_config.yml +++ b/test/functional/config/example_dut_config.yml @@ -8,6 +8,9 @@ type: "local" # env: "HTTPS_PROXY=myproxy.example:12345" +# By enabling this option framework is allowed to retrieve random non-os disks from DUT. +# It can lead to data loss!!! +allow_disk_autoselect: False working_dir: "/tmp/open-cas-linux/" disks: diff --git a/test/functional/test-framework b/test/functional/test-framework index 7c5c8fd..547fcaa 160000 --- a/test/functional/test-framework +++ b/test/functional/test-framework @@ -1 +1 @@ -Subproject commit 7c5c8fd5143497c56a8fb0cc1fe9a923f48a9db1 +Subproject commit 547fcaa5fb0cdc3ce5696785ce7d7ced81a85005 diff --git a/test/functional/tests/conftest.py b/test/functional/tests/conftest.py index d94f781..2af4811 100644 --- a/test/functional/tests/conftest.py +++ b/test/functional/tests/conftest.py @@ -16,6 +16,7 @@ from api.cas import installer from api.cas import casadm from api.cas import git 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 test_utils.singleton import Singleton @@ -181,6 +182,11 @@ def base_prepare(item): except Exception: 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: installer.reinstall_opencas() elif not installer.check_if_installed():