From e2ea2f1b30ce415b31ccd9b40e084fb41d9df7ed Mon Sep 17 00:00:00 2001 From: Slawomir Jankowski Date: Tue, 5 Jan 2021 16:29:41 +0100 Subject: [PATCH] Fix recent change in functional tests API Signed-off-by: Slawomir Jankowski --- test/functional/api/cas/cache.py | 2 +- test/functional/api/cas/core.py | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/test/functional/api/cas/cache.py b/test/functional/api/cas/cache.py index 7965407..6c8665e 100644 --- a/test/functional/api/cas/cache.py +++ b/test/functional/api/cas/cache.py @@ -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] diff --git a/test/functional/api/cas/core.py b/test/functional/api/cas/core.py index a6e7bc6..bb815d9 100644 --- a/test/functional/api/cas/core.py +++ b/test/functional/api/cas/core.py @@ -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],