From c9c0cd2c92b214ce4dfb9c9d17e433bed406b0d9 Mon Sep 17 00:00:00 2001 From: Yaroslava Lukoyanova Date: Wed, 17 Jan 2024 18:53:02 +0300 Subject: [PATCH] Angie and nginx doesn't have --version parameter --- src/frostfs_testlib/utils/version_utils.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/frostfs_testlib/utils/version_utils.py b/src/frostfs_testlib/utils/version_utils.py index 42bde6d..fe6450a 100644 --- a/src/frostfs_testlib/utils/version_utils.py +++ b/src/frostfs_testlib/utils/version_utils.py @@ -57,7 +57,10 @@ def get_remote_binaries_versions(hosting: Hosting) -> dict[str, str]: for binary_name, binary in binary_path_by_name.items(): try: binary_path = binary["exec_path"] - result = shell.exec(f"{binary_path} --version") + if "angie" in binary_name or "nginx" in binary_name: + result = shell.exec(f"{binary_path} -version") + else: + result = shell.exec(f"{binary_path} --version") versions_at_host[binary_name] = {"version": _parse_version(result.stdout), "check": binary["check"]} except Exception as exc: logger.error(f"Cannot get version for {binary_path} because of\n{exc}")