You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@libcloud.apache.org by "Andreas (JIRA)" <ji...@apache.org> on 2018/08/27 12:19:00 UTC
[jira] [Updated] (LIBCLOUD-1010) 2.3.0: test_ssh_client tests
mostly skipped, missing failures with py3
[ https://issues.apache.org/jira/browse/LIBCLOUD-1010?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andreas updated LIBCLOUD-1010:
------------------------------
Summary: 2.3.0: test_ssh_client tests mostly skipped, missing failures with py3 (was: test_ssh_client tests mostly skipped, missing failures with py3)
> 2.3.0: test_ssh_client tests mostly skipped, missing failures with py3
> ----------------------------------------------------------------------
>
> Key: LIBCLOUD-1010
> URL: https://issues.apache.org/jira/browse/LIBCLOUD-1010
> Project: Libcloud
> Issue Type: Bug
> Components: Compute
> Affects Versions: 0.14.0-beta3
> Reporter: Andreas
> Priority: Major
>
> 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:
> bq. =================================== FAILURES ===================================
> bq. ParamikoSSHClientTests.test_consume_stderr_chunk_contains_part_of_multi_byte_utf8_character
> bq.
> bq. self = <libcloud.test.compute.test_ssh_client.ParamikoSSHClientTests testMethod=test_consume_stderr_chunk_contains_part_of_multi_byte_utf8_character>
> bq.
> bq. def test_consume_stderr_chunk_contains_part_of_multi_byte_utf8_character(self):
> bq. conn_params = {'hostname': 'dummy.host.org',
> bq. 'username': 'ubuntu'}
> bq. client = ParamikoSSHClient(**conn_params)
> bq. client.CHUNK_SIZE = 1
> bq.
> bq. chan = Mock()
> bq. chan.recv_stderr_ready.side_effect = [True, True, True, True, False]
> bq. chan.recv_stderr.side_effect = ['\xF0', '\x90', '\x8D', '\x88']
> bq.
> bq. stderr = client._consume_stderr(chan).getvalue()
> bq. > self.assertEqual('\xf0\x90\x8d\x88', stderr.encode('utf-8'))
> bq. E AssertionError: 'ð\x90\x8d\x88' != b'\xc3\xb0\xc2\x90\xc2\x8d\xc2\x88'
> bq.
> bq. libcloud/test/compute/test_ssh_client.py:340: AssertionError
> bq. ParamikoSSHClientTests.test_consume_stdout_chunk_contains_part_of_multi_byte_utf8_character
> bq.
> bq. self = <libcloud.test.compute.test_ssh_client.ParamikoSSHClientTests testMethod=test_consume_stdout_chunk_contains_part_of_multi_byte_utf8_character>
> bq.
> bq. def test_consume_stdout_chunk_contains_part_of_multi_byte_utf8_character(self):
> bq. conn_params = {'hostname': 'dummy.host.org',
> bq. 'username': 'ubuntu'}
> bq. client = ParamikoSSHClient(**conn_params)
> bq. client.CHUNK_SIZE = 1
> bq.
> bq. chan = Mock()
> bq. chan.recv_ready.side_effect = [True, True, True, True, False]
> bq. chan.recv.side_effect = ['\xF0', '\x90', '\x8D', '\x88']
> bq.
> bq. stdout = client._consume_stdout(chan).getvalue()
> bq. > self.assertEqual('\xf0\x90\x8d\x88', stdout.encode('utf-8'))
> bq.
> bq. E AssertionError: 'ð\x90\x8d\x88' != b'\xc3\xb0\xc2\x90\xc2\x8d\xc2\x88'
> bq.
> bq. libcloud/test/compute/test_ssh_client.py:326: AssertionError
>
>
> With python2.7, the test_ssh_client tests pass.
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)