示例#1
0
 def test_ssh_run_cmd_with_remote_cwd(self, run_cmd):
     ssh_run_cmd('user@remote', ['touch', '"#'], remote_cwd='workspace')
     run_cmd.assert_called_with(['ssh',
                                 '-q',
                                 '-oStrictHostKeyChecking=no',
                                 '-oUserKnownHostsFile=/dev/null',
                                 'user@remote',
                                 'mkdir -p workspace ; cd workspace ; touch \'"#\''])
示例#2
0
 def test_ssh_run_cmd(self, run_cmd):
     ssh_run_cmd('user@remote', ['touch', '"#'])
     run_cmd.assert_called_with(['ssh',
                                 '-q',
                                 '-oStrictHostKeyChecking=no',
                                 '-oUserKnownHostsFile=/dev/null',
                                 'user@remote',
                                 'touch \'"#\''])
示例#3
0
 def run_cmd(self, *args, **kwargs):
     return ssh_run_cmd(self._ssh_connect_string,
                        *args,
                        remote_cwd='workspace',
                        **kwargs)
 def run_cmd(self, *args, **kwargs):
     return ssh_run_cmd(self._ssh_connect_string, *args, remote_cwd='workspace', **kwargs)