File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change 38
38
except ImportError :
39
39
noboto3 = True
40
40
41
+ # Check for paramiko
41
42
try :
42
43
import paramiko
43
44
no_paramiko = False
45
+
46
+ # Check for localhost SSH Server
47
+ # FIXME: Tests requiring this are never run on CI
48
+ try :
49
+ proxy = None
50
+ client = paramiko .SSHClient ()
51
+ client .load_system_host_keys ()
52
+ client .set_missing_host_key_policy (paramiko .AutoAddPolicy ())
53
+ client .connect ('localhost' , username = os .getenv ('USER' ), sock = proxy )
54
+
55
+ no_local_ssh = False
56
+
57
+ except (paramiko .SSHException ,
58
+ paramiko .ssh_exception .NoValidConnectionsError ):
59
+ no_local_ssh = True
60
+
44
61
except ImportError :
45
62
no_paramiko = True
46
63
@@ -621,6 +638,7 @@ def test_bids_infields_outfields(tmpdir):
621
638
622
639
623
640
@pytest .mark .skipif (no_paramiko , reason = "paramiko library is not available" )
641
+ @pytest .mark .skipif (no_local_ssh , reason = "SSH Server is not running" )
624
642
def test_SSHDataGrabber (tmpdir ):
625
643
"""Test SSHDataGrabber by connecting to localhost and collecting some data.
626
644
"""
You can’t perform that action at this time.
0 commit comments