From: Alfredo Deza Date: Wed, 12 Dec 2018 19:29:28 +0000 (-0500) Subject: tests verify ssh_config options are passed in' X-Git-Tag: 0.0.35~4 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=f05df57c9a50c832b485c7ea38ba820273ab3da0;p=remoto.git tests verify ssh_config options are passed in' Signed-off-by: Alfredo Deza --- diff --git a/remoto/tests/test_connection.py b/remoto/tests/test_connection.py index 4332d44..7e4e30a 100644 --- a/remoto/tests/test_connection.py +++ b/remoto/tests/test_connection.py @@ -92,6 +92,11 @@ class TestMakeConnectionString(object): conn_string = conn._make_connection_string('localhost', _needs_ssh=lambda x: True) assert conn_string == 'ssh=localhost//python=sudo python' + def test_makes_sudo_python_with_ssh_options(self): + conn = connection.Connection('localhost', sudo=True, eager=False, interpreter='python', ssh_options='-F vagrant_ssh_config') + conn_string = conn._make_connection_string('localhost', _needs_ssh=lambda x: True) + assert conn_string == 'ssh=-F vagrant_ssh_config localhost//python=sudo python' + def test_makes_python_no_ssh(self): conn = connection.Connection('localhost', sudo=False, eager=False, interpreter='python') conn_string = conn._make_connection_string('localhost', _needs_ssh=lambda x: False)