From 38aae49cbf2f7767bb0ed7c4470b227baf8aea62 Mon Sep 17 00:00:00 2001 From: Maksim Drachov Date: Thu, 25 Jul 2024 13:59:48 +0300 Subject: [PATCH] Fix execute_command test --- tests/cmd/execute_command.py | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/tests/cmd/execute_command.py b/tests/cmd/execute_command.py index df0d7d2..5b54cc9 100644 --- a/tests/cmd/execute_command.py +++ b/tests/cmd/execute_command.py @@ -94,15 +94,15 @@ async def _unittest_basic(_context: tuple[Runner, tuple[Remote, Remote]]) -> Non assert await run("10-12", "restart", "--timeout=3") == ( 0, { - "10": {"status": 0}, - "11": {"status": 0}, + "10": {"output": '', "status": 0}, + "11": {"output": '', "status": 0}, }, ) assert await run("10-12", "111", "COMMAND ARGUMENT", "--timeout=3") == ( 0, { - "10": {"status": 0}, - "11": {"status": 0}, + "10": {"output": '', "status": 0}, + "11": {"output": '', "status": 0}, }, ) assert ( @@ -122,15 +122,15 @@ async def _unittest_basic(_context: tuple[Runner, tuple[Remote, Remote]]) -> Non assert await run("10-12", "restart", "--timeout=3") == ( EXIT_CODE_UNSUCCESSFUL, { - "10": {"status": 100}, - "11": {"status": 200}, + "10": {"output": '', "status": 100}, + "11": {"output": '', "status": 200}, }, ) assert await run("10-12", "123", "--expect=100,200", "--timeout=3") == ( 0, { - "10": {"status": 100}, - "11": {"status": 200}, + "10": {"output": '', "status": 100}, + "11": {"output": '', "status": 200}, }, ) assert remote_10.last_request and remote_10.last_request.command == 123 @@ -143,14 +143,14 @@ async def _unittest_basic(_context: tuple[Runner, tuple[Remote, Remote]]) -> Non EXIT_CODE_UNSUCCESSFUL, { "10": None, - "11": {"status": 0}, + "11": {"output": '', "status": 0}, }, ) assert await run("10-12", "123", "--expect") == ( 0, { "10": None, - "11": {"status": 0}, + "11": {"output": '', "status": 0}, }, ) @@ -158,7 +158,7 @@ async def _unittest_basic(_context: tuple[Runner, tuple[Remote, Remote]]) -> Non remote_11.next_response = ExecuteCommand_1.Response(status=210) assert await run("11", "123", "FOO BAR", "--timeout=3") == ( EXIT_CODE_UNSUCCESSFUL, - {"status": 210}, + {"output": '', "status": 210}, ) assert ( remote_11.last_request @@ -167,7 +167,7 @@ async def _unittest_basic(_context: tuple[Runner, tuple[Remote, Remote]]) -> Non ) assert await run("11", "222", "--timeout=3", "--expect=0..256") == ( 0, - {"status": 210}, + {"output": '', "status": 210}, ) assert ( remote_11.last_request