From d0d0fdb9c85357d19149b2e1337d4484406c2097 Mon Sep 17 00:00:00 2001 From: Kamil Gierszewski Date: Mon, 23 Sep 2024 15:45:08 +0200 Subject: [PATCH 1/3] test-api: reformat cli_help_messages.py Signed-off-by: Kamil Gierszewski --- test/functional/api/cas/cli_help_messages.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/test/functional/api/cas/cli_help_messages.py b/test/functional/api/cas/cli_help_messages.py index b06c4b897..56c094fcc 100644 --- a/test/functional/api/cas/cli_help_messages.py +++ b/test/functional/api/cas/cli_help_messages.py @@ -274,11 +274,14 @@ r"-o --output-format \ Output format: \{table|csv\}", ] -help_help = [r"Usage: casadm --help", r"Print help"] +help_help = [ + r"Usage: casadm --help", + r"Print help", +] standby_help = [ - r"The command is not supported" + r"The command is not supported", ] zero_metadata_help = [ From 64e4b8d9a75bebc3ce6c31f607a1342752b53f89 Mon Sep 17 00:00:00 2001 From: Kamil Gierszewski Date: Mon, 23 Sep 2024 15:46:49 +0200 Subject: [PATCH 2/3] tests: fix test_cli_help test Signed-off-by: Kamil Gierszewski --- test/functional/tests/cli/test_cli_help_and_version.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/functional/tests/cli/test_cli_help_and_version.py b/test/functional/tests/cli/test_cli_help_and_version.py index 231597308..24eebe8b3 100644 --- a/test/functional/tests/cli/test_cli_help_and_version.py +++ b/test/functional/tests/cli/test_cli_help_and_version.py @@ -1,5 +1,6 @@ # # Copyright(c) 2020-2022 Intel Corporation +# Copyright(c) 2024 Huawei Technologies Co., Ltd. # SPDX-License-Identifier: BSD-3-Clause # @@ -60,7 +61,7 @@ def test_cli_help(shortcut): output = TestRun.executor.run("casadm" + (" -L" if shortcut else " --list-caches") + (" -H" if shortcut else " --help")) - check_stdout_msg(output, list_help) + check_stdout_msg(output, list_caches_help) output = TestRun.executor.run("casadm" + (" -P" if shortcut else " --stats") + (" -H" if shortcut else " --help")) From 6d719612928e600b2614cd237d46e89ff52c028e Mon Sep 17 00:00:00 2001 From: Kamil Gierszewski Date: Mon, 23 Sep 2024 22:39:01 +0200 Subject: [PATCH 3/3] test-api: fix core_pool remove Signed-off-by: Kamil Gierszewski --- test/functional/api/cas/casadm.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/functional/api/cas/casadm.py b/test/functional/api/cas/casadm.py index 3ac59dfb2..098830139 100644 --- a/test/functional/api/cas/casadm.py +++ b/test/functional/api/cas/casadm.py @@ -516,5 +516,5 @@ def remove_all_detached_cores() -> None: from api.cas.casadm_parser import get_cas_devices_dict devices = get_cas_devices_dict() - for dev in devices["core_pool"]: - TestRun.executor.run(remove_detached_cmd(dev["device"])) + for dev in devices["core_pool"].values(): + TestRun.executor.run(remove_detached_cmd(dev["device_path"]))