summaryrefslogtreecommitdiff
path: root/test-sftpfs
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2015-09-23 21:44:21 +0300
committerLars Wirzenius <liw@liw.fi>2015-09-23 21:44:59 +0300
commit97fba9ad17a505aac1a48f679a89f1ea9e54b491 (patch)
tree9d46d8cee5ca5d18fba6a20a010ec8739a4326ff /test-sftpfs
parent7f094825624676448651dd9ba662f56d24413c70 (diff)
downloadobnam-97fba9ad17a505aac1a48f679a89f1ea9e54b491.tar.gz
Add test to test-sftpfs for sftp://[::1]/ URLs
Diffstat (limited to 'test-sftpfs')
-rwxr-xr-xtest-sftpfs17
1 files changed, 17 insertions, 0 deletions
diff --git a/test-sftpfs b/test-sftpfs
index 255b8c24..33d84146 100755
--- a/test-sftpfs
+++ b/test-sftpfs
@@ -76,6 +76,23 @@ class SftpTests(unittest.TestCase, obnamlib.VfsTests):
fs.connect()
cwd = fs.getcwd()
self.assertEqual(cwd, '/')
+
+ def test_connect_to_remote_root_dir_using_ipv6_address(self):
+ url = 'sftp://[::1]/'
+ settings = {
+ 'pure-paramiko': False,
+ 'create': True,
+ 'sftp-delay': 0,
+ 'ssh-key': '',
+ 'strict-ssh-host-keys': False,
+ 'ssh-known-hosts': os.path.expanduser('~/.ssh/known_hosts'),
+ 'ssh-command': None,
+ 'ssh-host-keys-check': 'no',
+ }
+ fs = obnamlib.plugins.sftp_plugin.SftpFS(url, settings=settings)
+ fs.connect()
+ cwd = fs.getcwd()
+ self.assertEqual(cwd, '/')
def test_sets_path_to_absolute_path(self):
self.assertTrue(self.fs.path.startswith('/'))