From: Adam King Date: Wed, 17 Apr 2024 14:07:09 +0000 (-0400) Subject: mgr/cephadm: make remote_executables test able to handle ast.BinOp X-Git-Tag: testing/wip-vshankar-testing-20240515.171252-debug~47^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=d28aabd7e066d79d28e8fff46777e29d4b48ad59;p=ceph-ci.git mgr/cephadm: make remote_executables test able to handle ast.BinOp Was adding a line to serve.py that did if ((datetime_now() - t).total_seconds() < 60) and this was causing the remote_executables test to fail with ValueError: _names: unexpected type: where it seems the (datetime_now() - t) was resolving to an ast.BinOp node which had no case in _names. This patch makes it so the remote_executables test can also handle these BinOp nodes and the binary operations that could be within the node Signed-off-by: Adam King --- diff --git a/src/pybind/mgr/cephadm/tests/test_remote_executables.py b/src/pybind/mgr/cephadm/tests/test_remote_executables.py index a98f81a8df1..9d5bd458254 100644 --- a/src/pybind/mgr/cephadm/tests/test_remote_executables.py +++ b/src/pybind/mgr/cephadm/tests/test_remote_executables.py @@ -102,6 +102,24 @@ def _names(node): return [f""] if isinstance(node, ast.Subscript): return [f""] + if isinstance(node, ast.BinOp): + return [f"