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 3838except ImportError :
3939 noboto3 = True
4040
41+ # Check for paramiko
4142try :
4243 import paramiko
4344 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+
4461except ImportError :
4562 no_paramiko = True
4663
@@ -621,6 +638,7 @@ def test_bids_infields_outfields(tmpdir):
621638
622639
623640@pytest .mark .skipif (no_paramiko , reason = "paramiko library is not available" )
641+ @pytest .mark .skipif (no_local_ssh , reason = "SSH Server is not running" )
624642def test_SSHDataGrabber (tmpdir ):
625643 """Test SSHDataGrabber by connecting to localhost and collecting some data.
626644 """
You can’t perform that action at this time.
0 commit comments