diff options
author | Ondrej Holy <oholy@redhat.com> | 2016-06-03 16:49:41 +0200 |
---|---|---|
committer | Ondrej Holy <oholy@redhat.com> | 2016-06-03 16:49:41 +0200 |
commit | 7f093223b626489b41a76f396a2f9eafc5ddbb43 (patch) | |
tree | 5c3048e38a797e9dc136de5b637d2aab3d8e1e29 /test | |
parent | c38eada54168ec303fce76f3ec545c013485d592 (diff) | |
download | gvfs-7f093223b626489b41a76f396a2f9eafc5ddbb43.tar.gz |
test: Skip sftp tests if ssh key is not available
Currently sftp tests fail if ~/.ssh/id_rsa is not available with
the following error:
AssertionError: False is not true : This test needs an existing ~/.ssh/id_rsa
Sftp tests should be skipped if the key is not found to avoid test
suite failures.
https://bugzilla.gnome.org/show_bug.cgi?id=734370
Diffstat (limited to 'test')
-rwxr-xr-x | test/gvfs-test | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/test/gvfs-test b/test/gvfs-test index fbaebbc4..d180d9ab 100755 --- a/test/gvfs-test +++ b/test/gvfs-test @@ -447,15 +447,13 @@ class ArchiveMounter(GvfsTestCase): @unittest.skipUnless(os.getenv('XDG_RUNTIME_DIR'), 'No $XDG_RUNTIME_DIR available') +@unittest.skipUnless(os.path.exists(os.path.expanduser('~/.ssh/id_rsa')), 'This test needs an existing ~/.ssh/id_rsa') class Sftp(GvfsTestCase): def setUp(self): '''Run ssh server''' super().setUp() - self.assertTrue(os.path.exists(os.path.expanduser('~/.ssh/id_rsa')), - 'This test needs an existing ~/.ssh/id_rsa') - # find sftp-server for dir in ['/usr/local/lib/openssh', '/usr/lib/openssh', |