Skip to content

Commit

Permalink
[6.14.z] Cherry-pick: Fix ssh command usage (SatelliteQE#14703) (Sate…
Browse files Browse the repository at this point in the history
…lliteQE#15388)

Fix ssh command usage (SatelliteQE#14703)

Co-authored-by: Tasos Papaioannou <[email protected]>
  • Loading branch information
JacobCallahan and tpapaioa authored Jun 11, 2024
1 parent baaf2cf commit aa9891d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion robottelo/cli/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ def execute(
command,
)
response = ssh.command(
cmd.encode('utf-8'),
cmd,
hostname=hostname or cls.hostname or settings.server.hostname,
output_format=output_format,
timeout=timeout,
Expand Down
4 changes: 2 additions & 2 deletions tests/robottelo/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ def test_execute_with_raw_response(self, settings, command):
response = Base.execute('some_cmd', return_raw_response=True)
ssh_cmd = 'LANG=en_US hammer -v -u admin -p password some_cmd'
command.assert_called_once_with(
ssh_cmd.encode('utf-8'),
ssh_cmd,
hostname=mock.ANY,
output_format=None,
timeout=None,
Expand All @@ -277,7 +277,7 @@ def test_execute_with_performance(self, settings, command, handle_resp):
response = Base.execute('some_cmd', hostname=None, output_format='json')
ssh_cmd = 'LANG=en_US time -p hammer -v -u admin -p password --output=json some_cmd'
command.assert_called_once_with(
ssh_cmd.encode('utf-8'),
ssh_cmd,
hostname=mock.ANY,
output_format='json',
timeout=None,
Expand Down

0 comments on commit aa9891d

Please sign in to comment.