summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPetr Viktorin <pviktori@redhat.com>2014-01-14 17:16:12 +0100
committerPetr Viktorin <pviktori@redhat.com>2014-02-05 08:35:07 +0100
commit7b5124416b193ce026ff30f1968e00d8c800d881 (patch)
tree11b8d1001b8a51bcb8ac53c219b3860a256fea1a
parentb351b210be4809b856915a9c63a4288ebd3c9fdf (diff)
downloadfreeipa-7b5124416b193ce026ff30f1968e00d8c800d881.tar.gz
freeipa-7b5124416b193ce026ff30f1968e00d8c800d881.tar.xz
freeipa-7b5124416b193ce026ff30f1968e00d8c800d881.zip
integration tests OpenSSHTransport: Expand tilde to home in root_ssh_key_filename
Expand paths beginning with a tilde, such as the default ~/.ssh/id_rsa, to the home directory. https://fedorahosted.org/freeipa/ticket/4115
-rw-r--r--ipatests/test_integration/transport.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/ipatests/test_integration/transport.py b/ipatests/test_integration/transport.py
index 85c022221..066feaef6 100644
--- a/ipatests/test_integration/transport.py
+++ b/ipatests/test_integration/transport.py
@@ -284,7 +284,8 @@ class OpenSSHTransport(Transport):
'-o', 'UserKnownHostsFile=%s' % known_hosts_file]
if self.host.root_ssh_key_filename:
- argv.extend(['-i', self.host.root_ssh_key_filename])
+ key_filename = os.path.expanduser(self.host.root_ssh_key_filename)
+ argv.extend(['-i', key_filename])
elif self.host.root_password:
self.log.critical('Password authentication not supported')
raise RuntimeError('Password authentication not supported')