Log binaries versions upon testsetup #189
1 changed files with 7 additions and 0 deletions
|
@ -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():
|
||||
|
|
Loading…
Reference in a new issue