]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mgr/cephadm: make remote_executables test able to handle ast.BinOp 57397/head
authorAdam King <adking@redhat.com>
Wed, 17 Apr 2024 14:07:09 +0000 (10:07 -0400)
committerAdam King <adking@redhat.com>
Fri, 10 May 2024 15:43:09 +0000 (11:43 -0400)
commit3dbbf324f0e1717c2a95a252a0b7b34cb301e1fd
treed87393b7565a2840d8f3b1a392503fceac8e6d9a
parentd43c351912c96fd44eb5377b06b0717ce0628f4c
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>
(cherry picked from commit d28aabd7e066d79d28e8fff46777e29d4b48ad59)
src/pybind/mgr/cephadm/tests/test_remote_executables.py