Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
0.14.0-beta3
-
None
-
None
Description
Your github test suite (https://travis-ci.org/apache/libcloud/jobs/419100956) is skipping most of the test_ssh_client.py tests:
libcloud/test/compute/test_ssh_client.py ssssssssssssss..... [ 79%]
I suppose that happens because you don't install paramiko:
@unittest.skipIf(not have_paramiko, 'Skipping because paramiko is not available')
class ParamikoSSHClientTests(LibcloudTestCase):
That is missing real failures. When I run that test suite in ubuntu with python 3.6 and paramiko 2.0.0 or paramiko 2.4.1, I get these failures:
=================================== FAILURES ===================================
ParamikoSSHClientTests.test_consume_stderr_chunk_contains_part_of_multi_byte_utf8_character
self = <libcloud.test.compute.test_ssh_client.ParamikoSSHClientTests testMethod=test_consume_stderr_chunk_contains_part_of_multi_byte_utf8_character>
def test_consume_stderr_chunk_contains_part_of_multi_byte_utf8_character(self):
conn_params = {'hostname': 'dummy.host.org', bq. 'username': 'ubuntu'}
client = ParamikoSSHClient(**conn_params)
client.CHUNK_SIZE = 1
chan = Mock()
chan.recv_stderr_ready.side_effect = [True, True, True, True, False]
chan.recv_stderr.side_effect = ['\xF0', '\x90', '\x8D', '\x88']
stderr = client._consume_stderr(chan).getvalue()
> self.assertEqual('\xf0\x90\x8d\x88', stderr.encode('utf-8'))
E AssertionError: 'ð\x90\x8d\x88' != b'\xc3\xb0\xc2\x90\xc2\x8d\xc2\x88'
libcloud/test/compute/test_ssh_client.py:340: AssertionError
ParamikoSSHClientTests.test_consume_stdout_chunk_contains_part_of_multi_byte_utf8_character
self = <libcloud.test.compute.test_ssh_client.ParamikoSSHClientTests testMethod=test_consume_stdout_chunk_contains_part_of_multi_byte_utf8_character>
def test_consume_stdout_chunk_contains_part_of_multi_byte_utf8_character(self):
conn_params = {'hostname': 'dummy.host.org', bq. 'username': 'ubuntu'}
client = ParamikoSSHClient(**conn_params)
client.CHUNK_SIZE = 1
chan = Mock()
chan.recv_ready.side_effect = [True, True, True, True, False]
chan.recv.side_effect = ['\xF0', '\x90', '\x8D', '\x88']
stdout = client._consume_stdout(chan).getvalue()
> self.assertEqual('\xf0\x90\x8d\x88', stdout.encode('utf-8'))
E AssertionError: 'ð\x90\x8d\x88' != b'\xc3\xb0\xc2\x90\xc2\x8d\xc2\x88'
libcloud/test/compute/test_ssh_client.py:326: AssertionError
With python2.7, the test_ssh_client tests pass.