From f2bded64e4a7672ae038b09544567830cc76a81f Mon Sep 17 00:00:00 2001 From: Liza Date: Mon, 4 Mar 2024 17:01:24 +0300 Subject: [PATCH] [#189] Add setup step to check binaries versions Signed-off-by: Liza --- src/frostfs_testlib/utils/version_utils.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/frostfs_testlib/utils/version_utils.py b/src/frostfs_testlib/utils/version_utils.py index 91b1d98..f1b7e37 100644 --- a/src/frostfs_testlib/utils/version_utils.py +++ b/src/frostfs_testlib/utils/version_utils.py @@ -1,6 +1,7 @@ import logging import re +from frostfs_testlib import reporter from frostfs_testlib.cli import FrostfsAdm, FrostfsCli from frostfs_testlib.hosting import Host, Hosting from frostfs_testlib.resources.cli import FROSTFS_ADM_EXEC, FROSTFS_AUTHMATE_EXEC, FROSTFS_CLI_EXEC, NEOGO_EXECUTABLE @@ -10,6 +11,7 @@ from frostfs_testlib.testing.parallel import parallel logger = logging.getLogger("NeoLogger") +@reporter.step("Get local binaries versions") def get_local_binaries_versions(shell: Shell) -> dict[str, str]: versions = {} @@ -29,6 +31,7 @@ def get_local_binaries_versions(shell: Shell) -> dict[str, str]: out = shell.exec("aws --version").stdout out_lines = out.split("\n") versions["AWS"] = out_lines[0] if out_lines else "Unknown" + logger.info(f"Local binaries version: {out_lines[0]}") return versions @@ -66,6 +69,7 @@ def parallel_binary_verions(host: Host) -> dict[str, str]: return versions_by_host +@reporter.step("Get remote binaries versions") def get_remote_binaries_versions(hosting: Hosting) -> dict[str, str]: versions_by_host = {} future_binary_verions = parallel(parallel_binary_verions, parallel_items=hosting.hosts) @@ -94,6 +98,9 @@ def get_remote_binaries_versions(hosting: Hosting) -> dict[str, str]: versions[name] = {"version": version, "check": binary["check"]} previous_host = host + logger.info( + "Remote binaries versions:\n" + "\n".join([f"{key} ver: {value['version']}" for key, value in versions.items()]) + ) if exception: for i in exception: for host in versions_by_host.keys():