]> git-server-git.apps.pok.os.sepia.ceph.com Git - remoto.git/commitdiff
tests verify ssh_config options are passed in'
authorAlfredo Deza <alfredo@deza.pe>
Wed, 12 Dec 2018 19:29:28 +0000 (14:29 -0500)
committerAlfredo Deza <alfredo@deza.pe>
Wed, 12 Dec 2018 19:29:28 +0000 (14:29 -0500)
Signed-off-by: Alfredo Deza <alfredo@deza.pe>
remoto/tests/test_connection.py

index 4332d443672bd7fe0b92001d8e9c990dbda01fd1..7e4e30a774cdffb20ceaf529f19c355723fa453e 100644 (file)
@@ -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)