Skip to content

Commit 9f3e5db

Browse files
committed
Fix tests for execute_together
1 parent 598cc34 commit 9f3e5db

File tree

1 file changed

+39
-6
lines changed

1 file changed

+39
-6
lines changed

test/test_ssh_client_execute.py

Lines changed: 39 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -450,12 +450,28 @@ def test_009_execute_together(ssh, ssh2, execute_async, exec_result, run_paramet
450450

451451
if 0 == run_parameters["ec"]:
452452
results = exec_helpers.SSHClient.execute_together(
453-
remotes=remotes, command=command, stdin=run_parameters.get("stdin", None)
453+
remotes=remotes,
454+
command=command,
455+
stdin=run_parameters["stdin"],
456+
open_stdout=run_parameters["open_stdout"],
457+
open_stderr=run_parameters["open_stderr"],
454458
)
455459
execute_async.assert_has_calls(
456460
(
457-
mock.call(command, stdin=run_parameters.get("stdin", None), log_mask_re=None),
458-
mock.call(command, stdin=run_parameters.get("stdin", None), log_mask_re=None),
461+
mock.call(
462+
command,
463+
stdin=run_parameters["stdin"],
464+
log_mask_re=None,
465+
open_stdout=run_parameters["open_stdout"],
466+
open_stderr=run_parameters["open_stderr"],
467+
),
468+
mock.call(
469+
command,
470+
stdin=run_parameters["stdin"],
471+
log_mask_re=None,
472+
open_stdout=run_parameters["open_stdout"],
473+
open_stderr=run_parameters["open_stderr"],
474+
),
459475
)
460476
)
461477
assert results == {(host, port): exec_result, (host2, port): exec_result}
@@ -472,12 +488,29 @@ def test_010_execute_together_expected(ssh, ssh2, execute_async, exec_result, ru
472488
remotes = [ssh, ssh2]
473489

474490
results = exec_helpers.SSHClient.execute_together(
475-
remotes=remotes, command=command, stdin=run_parameters.get("stdin", None), expected=[run_parameters["ec"]]
491+
remotes=remotes,
492+
command=command,
493+
stdin=run_parameters["stdin"],
494+
open_stdout=run_parameters["open_stdout"],
495+
open_stderr=run_parameters["open_stderr"],
496+
expected=[run_parameters["ec"]],
476497
)
477498
execute_async.assert_has_calls(
478499
(
479-
mock.call(command, stdin=run_parameters.get("stdin", None), log_mask_re=None),
480-
mock.call(command, stdin=run_parameters.get("stdin", None), log_mask_re=None),
500+
mock.call(
501+
command,
502+
stdin=run_parameters.get("stdin", None),
503+
log_mask_re=None,
504+
open_stdout=run_parameters["open_stdout"],
505+
open_stderr=run_parameters["open_stderr"],
506+
),
507+
mock.call(
508+
command,
509+
stdin=run_parameters.get("stdin", None),
510+
log_mask_re=None,
511+
open_stdout=run_parameters["open_stdout"],
512+
open_stderr=run_parameters["open_stderr"],
513+
),
481514
)
482515
)
483516
assert results == {(host, port): exec_result, (host2, port): exec_result}

0 commit comments

Comments
 (0)