OS tools refactor:
- make udev, runlevel, memory and wget separate files - rename os_utils to os_tools and move it to test_tools - remove ModuleRemoveMethod and set modprobe as default - fix regex in is_kernel_module_loaded method - remove get_sys_block_path - move get_block_device_names method to disk tools Signed-off-by: Katarzyna Treder <katarzyna.treder@h-partners.com>
This commit is contained in:
@@ -23,3 +23,13 @@ def reload_daemon():
|
||||
|
||||
def restart_service(name):
|
||||
TestRun.executor.run_expect_success(f"systemctl restart {name}")
|
||||
|
||||
|
||||
def get_service_path(unit_name):
|
||||
cmd = f"systemctl cat {unit_name}"
|
||||
|
||||
# path is in second column of first line of output
|
||||
info = TestRun.executor.run_expect_success(cmd).stdout
|
||||
path = info.splitlines()[0].split()[1]
|
||||
|
||||
return path
|
||||
|
||||
Reference in New Issue
Block a user