Merge pull request #616 from Ostrokrzew/api_fix

Fix recent change in functional tests API
This commit is contained in:
Robert Baldyga 2021-01-05 18:31:46 +01:00 committed by GitHub
commit 5d5b6ae594
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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],