Lines Matching full:ssh

17 """Tests for acloud.internal.lib.ssh."""
30 from acloud.internal.lib import ssh
35 """Test ssh class."""
39 FAKE_IP = ssh.IP(external="1.1.1.1", internal="10.1.1.1")
40 FAKE_EXTRA_ARGS_SSH = "-o ProxyCommand='ssh [email protected] Server 22'"
61 None, "ssh command fail."))
63 ssh.ShellCmdWithRetry,
68 ssh_object = ssh.Ssh(ip=self.FAKE_IP,
73 "/usr/bin/ssh -i /fake/acloud_rea -o LogLevel=ERROR -o ControlPath=none "
80 ssh_object = ssh.Ssh(self.FAKE_IP, self.FAKE_SSH_USER, self.FAKE_SSH_PRIVATE_KEY_PATH)
82 "/usr/bin/ssh -i /fake/acloud_rea -o LogLevel=ERROR -o ControlPath=none "
94 """Test ssh run command."""
97 ssh_object = ssh.Ssh(self.FAKE_IP, self.FAKE_SSH_USER, self.FAKE_SSH_PRIVATE_KEY_PATH)
100 "exec /usr/bin/ssh -i /fake/acloud_rea -o LogLevel=ERROR -o ControlPath=none "
111 """test ssh rum command with extra command."""
114 ssh_object = ssh.Ssh(self.FAKE_IP,
120 "exec /usr/bin/ssh -i /fake/acloud_rea -o LogLevel=ERROR -o ControlPath=none "
122 "-o ProxyCommand='ssh [email protected] Server 22' "
134 ssh_object = ssh.Ssh(self.FAKE_IP, self.FAKE_SSH_USER, self.FAKE_SSH_PRIVATE_KEY_PATH)
150 ssh_object = ssh.Ssh(self.FAKE_IP,
158 "-o ProxyCommand='ssh [email protected] Server 22' "
170 ssh_object = ssh.Ssh(self.FAKE_IP, self.FAKE_SSH_USER, self.FAKE_SSH_PRIVATE_KEY_PATH)
186 ssh_object = ssh.Ssh(self.FAKE_IP,
194 "-o ProxyCommand='ssh [email protected] Server 22' "
207 ssh_object = ssh.Ssh(ip=ssh.IP(external="1.1.1.1", internal="10.1.1.1"),
215 ssh_object = ssh.Ssh(ip=ssh.IP(external="1.1.1.1", internal="10.1.1.1"),
222 ssh_object = ssh.Ssh(ip=ssh.IP(ip="1.1.1.1"),
230 ssh_object = ssh.Ssh(ip=self.FAKE_IP,
246 ssh._SshCallWait(fake_cmd)
255 ssh._SshCallWait(fake_cmd, fake_timeout)
263 ssh._SshCall(fake_cmd)
272 ssh._SshCall(fake_cmd, fake_timeout)
280 ssh._SshLogOutput(fake_cmd)
286 errors.DeviceConnectionError, ssh._SshLogOutput, fake_cmd)
290 subprocess.CalledProcessError, ssh._SshLogOutput, fake_cmd)
296 errors.LaunchCVDFail, ssh._SshLogOutput, fake_cmd)
302 errors.LaunchCVDFail, ssh._SshLogOutput, fake_cmd)
310 ssh._SshLogOutput(fake_cmd, fake_timeout)
322 self.assertEqual(ssh._GetErrorMessage(fake_output), "fake_error_response")
338 self.assertEqual(ssh._GetErrorMessage(fake_output), "Unknown Error.")
353 self.assertEqual(ssh._GetErrorMessage(fake_output), "\n".join(
367 self.assertEqual(ssh._FilterUnusedContent(fake_content), expected)