Angie and nginx doesn't have --version parameter #159

Closed
ylukoyan wants to merge 1 commit from ylukoyan/frostfs-testlib:angie into master

View file

@ -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}")