Fix recent change in functional tests API

Signed-off-by: Slawomir Jankowski <slawomir.jankowski@intel.com>
This commit is contained in:
Slawomir Jankowski 2021-01-05 16:29:41 +01:00
parent 42c3f3ed8c
commit e2ea2f1b30
2 changed files with 4 additions and 3 deletions

View File

@ -19,7 +19,7 @@ class Cache:
self.__metadata_size = None
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)
if output.exit_code == 0 and output.stdout.strip():
return output.stdout.split()[1]

View File

@ -44,8 +44,9 @@ class Core(Device):
output_lines = output.stdout.splitlines()
for line in output_lines:
split_line = line.split(',')
if split_line[0] == "core" and (split_line[2] == self.core_device.short_path
or split_line[5] == self.path):
if (split_line[0] == "core"
and (split_line[2] == fs_utils.readlink(self.core_device.path)
or split_line[5] == self.path)):
return {"core_id": split_line[1],
"core_device": split_line[2],
"status": split_line[3],