From 5d1e4efdc8c367bcb36eda92228bf84a4a21ab81 Mon Sep 17 00:00:00 2001 From: Vladimir Domnich Date: Thu, 28 Jul 2022 17:42:32 +0300 Subject: [PATCH] Added extra error handling for ticking epoch with neofs. --- robot/resources/lib/python_keywords/epoch.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/robot/resources/lib/python_keywords/epoch.py b/robot/resources/lib/python_keywords/epoch.py index c8a2e610..33e9e594 100644 --- a/robot/resources/lib/python_keywords/epoch.py +++ b/robot/resources/lib/python_keywords/epoch.py @@ -28,8 +28,13 @@ def tick_epoch(): # If neofs-adm is available, then we tick epoch with it (to be consistent with UAT tests) cmd = f"{NEOFS_ADM_EXEC} morph force-new-epoch -c {NEOFS_ADM_CONFIG_PATH}" logger.info(f"Executing shell command: {cmd}") - out = wrappers.run_sh(cmd) - logger.info(f"Command completed with output: {out}") + try: + out = wrappers.run_sh(cmd) + logger.info(f"Command completed with output: {out}") + except Exception as exc: + logger.error(exc) + raise RuntimeError("Failed to tick epoch") from exc + return # Otherwise we tick epoch using transaction