ganto / copr-lxd

RPM spec files for building lxd on Fedora COPR
MIT License
9 stars 2 forks source link

python-requests_unixsocket-0.1.5-1 fails test suite on Fedora 26 #3

Closed ganto closed 7 years ago

ganto commented 7 years ago
============================= test session starts ==============================
platform linux2 -- Python 2.7.12, pytest-3.0.5, py-1.4.31, pluggy-0.4.0
rootdir: /builddir/build/BUILD/requests-unixsocket-0.1.5, inifile: pytest.ini
plugins: pep8-1.0.6, capturelog-0.7
collected 10 items
setup.py .
requests_unixsocket/__init__.py .
requests_unixsocket/adapters.py .
requests_unixsocket/testutils.py .
requests_unixsocket/tests/test_requests_unixsocket.py .FF..F
=================================== FAILURES ===================================
_________________________ test_unix_domain_adapter_ok __________________________
requests_unixsocket/tests/test_requests_unixsocket.py:37: in test_unix_domain_adapter_ok
    assert r.url == url
E   assert 'http+unix://.../path/to/page' == 'http+unix://%.../path/to/page'
E     Skipping 37 identical trailing characters in diff, use -v to show
E     - http+unix://%2ftmp%2ftest_requ
E     ?               ^     ^
E     + http+unix://%2Ftmp%2Ftest_requ
E     ?               ^     ^
--------------------------------- Captured log ---------------------------------
testutils.py                88 DEBUG    Starting <UnixSocketServerThread(Thread-1, initial)> ...
testutils.py                79 DEBUG    Call waitress.serve in <UnixSocketServerThread(Thread-1, started 140024719906560)> ...
testutils.py                90 DEBUG    Started <UnixSocketServerThread(Thread-1, started 140024719906560)>.
test_requests_unixsocket.py   26 DEBUG    Calling session.get('http+unix://%2Ftmp%2Ftest_requests.56842_5026_44257451/path/to/page') ...
testutils.py                45 DEBUG    WSGIApp.__call__: Invoked for /path/to/page
testutils.py                46 DEBUG    WSGIApp.__call__: environ = {'SERVER_SOFTWARE': 'waitress', 'SCRIPT_NAME': '', 'REQUEST_METHOD': 'GET', 'PATH_INFO': '/path/to/page', 'SERVER_PROTOCOL': 'HTTP/1.1', 'QUERY_STRING': '', 'HTTP_USER_AGENT': 'python-requests/2.12.3', 'HTTP_CONNECTION': 'keep-alive', 'SERVER_NAME': 'unix', 'REMOTE_ADDR': 'localhost', 'wsgi.url_scheme': 'http', 'SERVER_PORT': '/tmp/test_requests.56842_5026_44257451', 'wsgi.input': <_io.BytesIO object at 0x7f5a0bbb50b0>, 'HTTP_HOST': 'localhost', 'wsgi.multithread': True, 'HTTP_ACCEPT': '*/*', 'wsgi.version': (1, 0), 'wsgi.run_once': False, 'wsgi.errors': <_pytest.capture.EncodedFile object at 0x7f5a0d959150>, 'wsgi.multiprocess': False, 'wsgi.file_wrapper': <class 'waitress.buffers.ReadOnlyFileBasedBuffer'>, 'HTTP_ACCEPT_ENCODING': 'gzip, deflate'}
testutils.py                60 DEBUG    WSGIApp.__call__: Responding with status_text = '200 OK'; response_headers = [('X-Transport', 'unix domain socket'), ('X-Socket-Path', '/tmp/test_requests.56842_5026_44257451'), ('X-Requested-Query-String', ''), ('X-Requested-Path', '/path/to/page')]; body_bytes = 'Hello world!'
connectionpool.py          400 DEBUG    http://localhost:None "GET /path/to/page HTTP/1.1" 200 12
test_requests_unixsocket.py   30 DEBUG    Received response: <Response [200]> with text: u'Hello world!' and headers: {'Content-Length': '12', 'X-Socket-Path': '/tmp/test_requests.56842_5026_44257451', 'X-Requested-Query-String': '', 'Server': 'waitress', 'X-Requested-Path': '/path/to/page', 'Date': 'Sun, 18 Dec 2016 02:42:35 GMT', 'X-Transport': 'unix domain socket'}

For the full build logs see COPR Build 490629: fedora-26-x86_64

Might be related to msabramo/requests-unixsocket#24 as Fedora 26 already uses python2-requests-2.12.3-1.fc26. Although pylxd upstream only has python-requests-2.12.1 and python-requests-2.12.2 excluded in requirements.txt so it might be something different.

ganto commented 7 years ago

Issue fixed with 65ec0d8a6f897ad121cd50ab70c46d181a118882 (python-requests_unixsocket-0.1.5-2) thanks to the patch from msabramo/requests-unixsocket#27