Merge pull request #616 from Ostrokrzew/api_fix
Fix recent change in functional tests API
This commit is contained in:
commit
5d5b6ae594
@ -19,7 +19,7 @@ class Cache:
|
|||||||
self.__metadata_size = None
|
self.__metadata_size = None
|
||||||
|
|
||||||
def __get_cache_id(self):
|
def __get_cache_id(self):
|
||||||
cmd = f"{list_cmd(by_id_path=False)} | grep {self.cache_device.short_path}"
|
cmd = f"{list_cmd(by_id_path=False)} | grep {self.cache_device.get_device_id()}"
|
||||||
output = TestRun.executor.run(cmd)
|
output = TestRun.executor.run(cmd)
|
||||||
if output.exit_code == 0 and output.stdout.strip():
|
if output.exit_code == 0 and output.stdout.strip():
|
||||||
return output.stdout.split()[1]
|
return output.stdout.split()[1]
|
||||||
|
@ -44,8 +44,9 @@ class Core(Device):
|
|||||||
output_lines = output.stdout.splitlines()
|
output_lines = output.stdout.splitlines()
|
||||||
for line in output_lines:
|
for line in output_lines:
|
||||||
split_line = line.split(',')
|
split_line = line.split(',')
|
||||||
if split_line[0] == "core" and (split_line[2] == self.core_device.short_path
|
if (split_line[0] == "core"
|
||||||
or split_line[5] == self.path):
|
and (split_line[2] == fs_utils.readlink(self.core_device.path)
|
||||||
|
or split_line[5] == self.path)):
|
||||||
return {"core_id": split_line[1],
|
return {"core_id": split_line[1],
|
||||||
"core_device": split_line[2],
|
"core_device": split_line[2],
|
||||||
"status": split_line[3],
|
"status": split_line[3],
|
||||||
|
Loading…
Reference in New Issue
Block a user