]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mgr/cephadm: make remote_executables test able to handle ast.BinOp 56957/head
authorAdam King <adking@redhat.com>
Wed, 17 Apr 2024 14:07:09 +0000 (10:07 -0400)
committerAdam King <adking@redhat.com>
Mon, 22 Apr 2024 20:14:57 +0000 (16:14 -0400)
commitd28aabd7e066d79d28e8fff46777e29d4b48ad59
tree7dbb6492b99436020e3ab8c4e3b96cd1858470b0
parent2f31a481ffc7cf6322b957f52bbfaa6ebbd96da2
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: <ast.BinOp object at 0x7f0985c8d670>

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 <adking@redhat.com>
src/pybind/mgr/cephadm/tests/test_remote_executables.py