Skip to content

Commit

Permalink
Fix ssh command usage (SatelliteQE#14703)
Browse files Browse the repository at this point in the history
  • Loading branch information
tpapaioa authored and JacobCallahan committed Jun 10, 2024
1 parent 048a61e commit bc9428c
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 bc9428c

Please sign in to comment.