You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@libcloud.apache.org by "Erich Eckner (JIRA)" <ji...@apache.org> on 2017/09/19 14:28:00 UTC

[jira] [Created] (LIBCLOUD-945) testsuite fails on i686

Erich Eckner created LIBCLOUD-945:
-------------------------------------

             Summary: testsuite fails on i686
                 Key: LIBCLOUD-945
                 URL: https://issues.apache.org/jira/browse/LIBCLOUD-945
             Project: Libcloud
          Issue Type: Bug
         Environment: build of python-apache-libcloud 2.2.0 on archlinux with python3 on intel 32 bit
            Reporter: Erich Eckner


There are several failures during test, because of type mismatches

=================================== FAILURES ===================================
________________ AzureBlobsTests.test_upload_object_invalid_md5 ________________

self = <libcloud.test.storage.test_azure_blobs.AzureBlobsTests testMethod=test_upload_object_invalid_md5>

    def test_upload_object_invalid_md5(self):
        # Invalid md5 is returned by azure
        self.mock_response_klass.type = 'INVALID_HASH'
    
        container = Container(name='foo_bar_container', extra={},
                              driver=self.driver)
        object_name = 'foo_test_upload'
        file_path = os.path.abspath(__file__)
        try:
            self.driver.upload_object(file_path=file_path, container=container,
                                      object_name=object_name,
>                                     verify_hash=True)

libcloud/test/storage/test_azure_blobs.py:640: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
libcloud/storage/drivers/azure_blobs.py:771: in upload_object
    use_lease=ex_use_lease)
libcloud/storage/drivers/azure_blobs.py:895: in _put_object
    stream=stream)
libcloud/storage/base.py:627: in _upload_object
    headers=headers, raw=True)
libcloud/common/base.py:590: in request
    stream=stream)
libcloud/test/__init__.py:163: in prepared_request
    raw=raw, stream=stream)
libcloud/http.py:227: in prepared_request
    prepped = self.session.prepare_request(req)
/usr/lib/python2.7/site-packages/requests/sessions.py:437: in prepare_request
    hooks=merge_hooks(request.hooks, self.hooks),
/usr/lib/python2.7/site-packages/requests/models.py:306: in prepare
    self.prepare_headers(headers)
/usr/lib/python2.7/site-packages/requests/models.py:440: in prepare_headers
    check_header_validity(header)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

header = ('Content-Length', 37589L)

    def check_header_validity(header):
        """Verifies that header value is a string which doesn't contain
        leading whitespace or return characters. This prevents unintended
        header injection.
    
        :param header: tuple, in the format (name, value).
        """
        name, value = header
    
        if isinstance(value, bytes):
            pat = _CLEAN_HEADER_REGEX_BYTE
        else:
            pat = _CLEAN_HEADER_REGEX_STR
        try:
            if not pat.match(value):
                raise InvalidHeader("Invalid return character or leading space in header: %s" % name)
        except TypeError:
            raise InvalidHeader("Value for header {%s: %s} must be of type str or "
>                               "bytes, not %s" % (name, value, type(value)))
E           InvalidHeader: Value for header {Content-Length: 37589} must be of type str or bytes, not <type 'long'>

/usr/lib/python2.7/site-packages/requests/utils.py:872: InvalidHeader
_______________ AzureBlobsTests.test_upload_page_object_success ________________

self = <libcloud.test.storage.test_azure_blobs.AzureBlobsTests testMethod=test_upload_page_object_success>

    def test_upload_page_object_success(self):
        self.mock_response_klass.use_param = None
        file_path = tempfile.mktemp(suffix='.jpg')
        file_size = AZURE_PAGE_CHUNK_SIZE * 4
    
        with open(file_path, 'w') as file_hdl:
            file_hdl.write('0' * file_size)
    
        container = Container(name='foo_bar_container', extra={},
                              driver=self.driver)
        object_name = 'foo_test_upload'
        extra = {'meta_data': {'some-value': 'foobar'}}
        obj = self.driver.upload_object(file_path=file_path,
                                        container=container,
                                        object_name=object_name,
                                        extra=extra,
                                        verify_hash=False,
>                                       ex_blob_type='PageBlob')

libcloud/test/storage/test_azure_blobs.py:707: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
libcloud/storage/drivers/azure_blobs.py:771: in upload_object
    use_lease=ex_use_lease)
libcloud/storage/drivers/azure_blobs.py:895: in _put_object
    stream=stream)
libcloud/storage/base.py:627: in _upload_object
    headers=headers, raw=True)
libcloud/common/base.py:590: in request
    stream=stream)
libcloud/test/__init__.py:163: in prepared_request
    raw=raw, stream=stream)
libcloud/http.py:227: in prepared_request
    prepped = self.session.prepare_request(req)
/usr/lib/python2.7/site-packages/requests/sessions.py:437: in prepare_request
    hooks=merge_hooks(request.hooks, self.hooks),
/usr/lib/python2.7/site-packages/requests/models.py:306: in prepare
    self.prepare_headers(headers)
/usr/lib/python2.7/site-packages/requests/models.py:440: in prepare_headers
    check_header_validity(header)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

header = ('x-ms-blob-content-length', 2048L)

    def check_header_validity(header):
        """Verifies that header value is a string which doesn't contain
        leading whitespace or return characters. This prevents unintended
        header injection.
    
        :param header: tuple, in the format (name, value).
        """
        name, value = header
    
        if isinstance(value, bytes):
            pat = _CLEAN_HEADER_REGEX_BYTE
        else:
            pat = _CLEAN_HEADER_REGEX_STR
        try:
            if not pat.match(value):
                raise InvalidHeader("Invalid return character or leading space in header: %s" % name)
        except TypeError:
            raise InvalidHeader("Value for header {%s: %s} must be of type str or "
>                               "bytes, not %s" % (name, value, type(value)))
E           InvalidHeader: Value for header {x-ms-blob-content-length: 2048} must be of type str or bytes, not <type 'long'>

/usr/lib/python2.7/site-packages/requests/utils.py:872: InvalidHeader
__________ AzureBlobsTests.test_upload_page_object_success_with_lease __________

self = <libcloud.test.storage.test_azure_blobs.AzureBlobsTests testMethod=test_upload_page_object_success_with_lease>

    def test_upload_page_object_success_with_lease(self):
        self.mock_response_klass.use_param = 'comp'
        file_path = tempfile.mktemp(suffix='.jpg')
        file_size = AZURE_PAGE_CHUNK_SIZE * 4
    
        with open(file_path, 'w') as file_hdl:
            file_hdl.write('0' * file_size)
    
        container = Container(name='foo_bar_container', extra={},
                              driver=self.driver)
        object_name = 'foo_test_upload'
        extra = {'meta_data': {'some-value': 'foobar'}}
        obj = self.driver.upload_object(file_path=file_path,
                                        container=container,
                                        object_name=object_name,
                                        extra=extra,
                                        verify_hash=False,
                                        ex_blob_type='PageBlob',
>                                       ex_use_lease=True)

libcloud/test/storage/test_azure_blobs.py:807: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
libcloud/storage/drivers/azure_blobs.py:771: in upload_object
    use_lease=ex_use_lease)
libcloud/storage/drivers/azure_blobs.py:895: in _put_object
    stream=stream)
libcloud/storage/base.py:627: in _upload_object
    headers=headers, raw=True)
libcloud/common/base.py:590: in request
    stream=stream)
libcloud/test/__init__.py:163: in prepared_request
    raw=raw, stream=stream)
libcloud/http.py:227: in prepared_request
    prepped = self.session.prepare_request(req)
/usr/lib/python2.7/site-packages/requests/sessions.py:437: in prepare_request
    hooks=merge_hooks(request.hooks, self.hooks),
/usr/lib/python2.7/site-packages/requests/models.py:306: in prepare
    self.prepare_headers(headers)
/usr/lib/python2.7/site-packages/requests/models.py:440: in prepare_headers
    check_header_validity(header)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

header = ('x-ms-blob-content-length', 2048L)

    def check_header_validity(header):
        """Verifies that header value is a string which doesn't contain
        leading whitespace or return characters. This prevents unintended
        header injection.
    
        :param header: tuple, in the format (name, value).
        """
        name, value = header
    
        if isinstance(value, bytes):
            pat = _CLEAN_HEADER_REGEX_BYTE
        else:
            pat = _CLEAN_HEADER_REGEX_STR
        try:
            if not pat.match(value):
                raise InvalidHeader("Invalid return character or leading space in header: %s" % name)
        except TypeError:
            raise InvalidHeader("Value for header {%s: %s} must be of type str or "
>                               "bytes, not %s" % (name, value, type(value)))
E           InvalidHeader: Value for header {x-ms-blob-content-length: 2048} must be of type str or bytes, not <type 'long'>

/usr/lib/python2.7/site-packages/requests/utils.py:872: InvalidHeader
____________ AzureBlobsTests.test_upload_small_block_object_success ____________

self = <libcloud.test.storage.test_azure_blobs.AzureBlobsTests testMethod=test_upload_small_block_object_success>

    def test_upload_small_block_object_success(self):
        file_path = os.path.abspath(__file__)
        file_size = os.stat(file_path).st_size
    
        container = Container(name='foo_bar_container', extra={},
                              driver=self.driver)
        object_name = 'foo_test_upload'
        extra = {'meta_data': {'some-value': 'foobar'}}
        obj = self.driver.upload_object(file_path=file_path,
                                        container=container,
                                        object_name=object_name,
                                        extra=extra,
                                        verify_hash=False,
>                                       ex_blob_type='BlockBlob')

libcloud/test/storage/test_azure_blobs.py:660: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
libcloud/storage/drivers/azure_blobs.py:771: in upload_object
    use_lease=ex_use_lease)
libcloud/storage/drivers/azure_blobs.py:895: in _put_object
    stream=stream)
libcloud/storage/base.py:627: in _upload_object
    headers=headers, raw=True)
libcloud/common/base.py:590: in request
    stream=stream)
libcloud/test/__init__.py:163: in prepared_request
    raw=raw, stream=stream)
libcloud/http.py:227: in prepared_request
    prepped = self.session.prepare_request(req)
/usr/lib/python2.7/site-packages/requests/sessions.py:437: in prepare_request
    hooks=merge_hooks(request.hooks, self.hooks),
/usr/lib/python2.7/site-packages/requests/models.py:306: in prepare
    self.prepare_headers(headers)
/usr/lib/python2.7/site-packages/requests/models.py:440: in prepare_headers
    check_header_validity(header)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

header = ('Content-Length', 37589L)

    def check_header_validity(header):
        """Verifies that header value is a string which doesn't contain
        leading whitespace or return characters. This prevents unintended
        header injection.
    
        :param header: tuple, in the format (name, value).
        """
        name, value = header
    
        if isinstance(value, bytes):
            pat = _CLEAN_HEADER_REGEX_BYTE
        else:
            pat = _CLEAN_HEADER_REGEX_STR
        try:
            if not pat.match(value):
                raise InvalidHeader("Invalid return character or leading space in header: %s" % name)
        except TypeError:
            raise InvalidHeader("Value for header {%s: %s} must be of type str or "
>                               "bytes, not %s" % (name, value, type(value)))
E           InvalidHeader: Value for header {Content-Length: 37589} must be of type str or bytes, not <type 'long'>

/usr/lib/python2.7/site-packages/requests/utils.py:872: InvalidHeader
______ AzureBlobsTests.test_upload_small_block_object_success_with_lease _______

self = <libcloud.test.storage.test_azure_blobs.AzureBlobsTests testMethod=test_upload_small_block_object_success_with_lease>

    def test_upload_small_block_object_success_with_lease(self):
        self.mock_response_klass.use_param = 'comp'
        file_path = os.path.abspath(__file__)
        file_size = os.stat(file_path).st_size
    
        container = Container(name='foo_bar_container', extra={},
                              driver=self.driver)
        object_name = 'foo_test_upload'
        extra = {'meta_data': {'some-value': 'foobar'}}
        obj = self.driver.upload_object(file_path=file_path,
                                        container=container,
                                        object_name=object_name,
                                        extra=extra,
                                        verify_hash=False,
                                        ex_blob_type='BlockBlob',
>                                       ex_use_lease=True)

libcloud/test/storage/test_azure_blobs.py:755: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
libcloud/storage/drivers/azure_blobs.py:771: in upload_object
    use_lease=ex_use_lease)
libcloud/storage/drivers/azure_blobs.py:895: in _put_object
    stream=stream)
libcloud/storage/base.py:627: in _upload_object
    headers=headers, raw=True)
libcloud/common/base.py:590: in request
    stream=stream)
libcloud/test/__init__.py:163: in prepared_request
    raw=raw, stream=stream)
libcloud/http.py:227: in prepared_request
    prepped = self.session.prepare_request(req)
/usr/lib/python2.7/site-packages/requests/sessions.py:437: in prepare_request
    hooks=merge_hooks(request.hooks, self.hooks),
/usr/lib/python2.7/site-packages/requests/models.py:306: in prepare
    self.prepare_headers(headers)
/usr/lib/python2.7/site-packages/requests/models.py:440: in prepare_headers
    check_header_validity(header)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

header = ('Content-Length', 37589L)

    def check_header_validity(header):
        """Verifies that header value is a string which doesn't contain
        leading whitespace or return characters. This prevents unintended
        header injection.
    
        :param header: tuple, in the format (name, value).
        """
        name, value = header
    
        if isinstance(value, bytes):
            pat = _CLEAN_HEADER_REGEX_BYTE
        else:
            pat = _CLEAN_HEADER_REGEX_STR
        try:
            if not pat.match(value):
                raise InvalidHeader("Invalid return character or leading space in header: %s" % name)
        except TypeError:
            raise InvalidHeader("Value for header {%s: %s} must be of type str or "
>                               "bytes, not %s" % (name, value, type(value)))
E           InvalidHeader: Value for header {Content-Length: 37589} must be of type str or bytes, not <type 'long'>

/usr/lib/python2.7/site-packages/requests/utils.py:872: InvalidHeader




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)