conftest: execute casadm-related cleanup only if CAS is installed during teardown
Signed-off-by: Michal Rakowski <michal.rakowski@intel.com>
This commit is contained in:
parent
97c8d07b77
commit
5edbf2a5a9
@ -94,10 +94,11 @@ def pytest_runtest_teardown():
|
|||||||
TestRun.executor.wait_for_connection()
|
TestRun.executor.wait_for_connection()
|
||||||
Udev.enable()
|
Udev.enable()
|
||||||
unmount_cas_devices()
|
unmount_cas_devices()
|
||||||
casadm.remove_all_detached_cores()
|
if installer.check_if_installed():
|
||||||
casadm.stop_all_caches()
|
casadm.remove_all_detached_cores()
|
||||||
from api.cas.init_config import InitConfig
|
casadm.stop_all_caches()
|
||||||
InitConfig.create_default_init_config()
|
from api.cas.init_config import InitConfig
|
||||||
|
InitConfig.create_default_init_config()
|
||||||
DeviceMapper.remove_all()
|
DeviceMapper.remove_all()
|
||||||
except Exception as ex:
|
except Exception as ex:
|
||||||
TestRun.LOGGER.warning(f"Exception occured during platform cleanup.\n"
|
TestRun.LOGGER.warning(f"Exception occured during platform cleanup.\n"
|
||||||
|
Loading…
Reference in New Issue
Block a user