Fix RemoteClient having bad default ssh_shell_prologue
Change-Id: I0e73b8deedf4bf78481cdf09b863dc149a70e9be Closes-Bug: #1707478
This commit is contained in:
parent
e669940831
commit
d8152de0da
@ -0,0 +1,7 @@
|
||||
---
|
||||
fixes:
|
||||
- |
|
||||
Fix RemoteClient default ssh_shell_prologue: Bug#1707478
|
||||
|
||||
The default ssh_shell_proloque has been modified from
|
||||
specifying erroneous PATH=$$PATH:/sbin to PATH=$PATH:/sbin.
|
@ -67,7 +67,7 @@ class RemoteClient(object):
|
||||
def __init__(self, ip_address, username, password=None, pkey=None,
|
||||
server=None, servers_client=None, ssh_timeout=300,
|
||||
connect_timeout=60, console_output_enabled=True,
|
||||
ssh_shell_prologue="set -eu -o pipefail; PATH=$$PATH:/sbin;",
|
||||
ssh_shell_prologue="set -eu -o pipefail; PATH=$PATH:/sbin;",
|
||||
ping_count=1, ping_size=56):
|
||||
"""Executes commands in a VM over ssh
|
||||
|
||||
|
@ -34,7 +34,7 @@ class TestRemoteClient(base.TestCase):
|
||||
client = remote_client.RemoteClient('192.168.1.10', 'username')
|
||||
client.exec_command('ls')
|
||||
mock_ssh_exec_command.assert_called_once_with(
|
||||
'set -eu -o pipefail; PATH=$$PATH:/sbin; ls')
|
||||
'set -eu -o pipefail; PATH=$PATH:/sbin; ls')
|
||||
|
||||
@mock.patch.object(ssh.Client, 'test_connection_auth')
|
||||
def test_validate_authentication(self, mock_test_connection_auth):
|
||||
|
Loading…
Reference in New Issue
Block a user