[ 
https://issues.apache.org/jira/browse/BEAM-1685?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15905036#comment-15905036
 ] 

Tibor Kiss commented on BEAM-1685:
----------------------------------

I have a solution with adding coverage & coveralls to tox:
https://github.com/tibkiss/beam/commit/999bf0d8572c0366a24469bce65232d0792a77f7

These commands works perfectly locally (on OS X), but I get SSL certification 
failures when using Travis.
{noformat:title=https://travis-ci.org/tibkiss/beam/jobs/209737739}
py27 runtests: commands[6] | coveralls
Submitting coverage to coveralls.io...
/home/travis/build/tibkiss/beam/sdks/python/target/.tox/py27/local/lib/python2.7/site-packages/requests/packages/urllib3/util/ssl_.py:334:
 SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name 
Indication) extension to TLS is not available on this platform. This may cause 
the server to present an incorrect TLS certificate, which can cause validation 
failures. You can upgrade to a newer version of Python to solve this. For more 
information, see 
https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
  SNIMissingWarning
/home/travis/build/tibkiss/beam/sdks/python/target/.tox/py27/local/lib/python2.7/site-packages/requests/packages/urllib3/util/ssl_.py:132:
 InsecurePlatformWarning: A true SSLContext object is not available. This 
prevents urllib3 from configuring SSL appropriately and may cause certain SSL 
connections to fail. You can upgrade to a newer version of Python to solve 
this. For more information, see 
https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
  InsecurePlatformWarning
Traceback (most recent call last):
  File 
"/home/travis/build/tibkiss/beam/sdks/python/target/.tox/py27/bin/coveralls", 
line 11, in <module>
    sys.exit(main())
  File 
"/home/travis/build/tibkiss/beam/sdks/python/target/.tox/py27/local/lib/python2.7/site-packages/coveralls/cli.py",
 line 62, in main
    result = coverallz.wear()
  File 
"/home/travis/build/tibkiss/beam/sdks/python/target/.tox/py27/local/lib/python2.7/site-packages/coveralls/api.py",
 line 93, in wear
    response = requests.post(self.api_endpoint, files={'json_file': 
json_string})
  File 
"/home/travis/build/tibkiss/beam/sdks/python/target/.tox/py27/local/lib/python2.7/site-packages/requests/api.py",
 line 110, in post
    return request('post', url, data=data, json=json, **kwargs)
  File 
"/home/travis/build/tibkiss/beam/sdks/python/target/.tox/py27/local/lib/python2.7/site-packages/requests/api.py",
 line 56, in request
    return session.request(method=method, url=url, **kwargs)
  File 
"/home/travis/build/tibkiss/beam/sdks/python/target/.tox/py27/local/lib/python2.7/site-packages/requests/sessions.py",
 line 488, in request
    resp = self.send(prep, **send_kwargs)
  File 
"/home/travis/build/tibkiss/beam/sdks/python/target/.tox/py27/local/lib/python2.7/site-packages/requests/sessions.py",
 line 609, in send
    r = adapter.send(request, **kwargs)
  File 
"/home/travis/build/tibkiss/beam/sdks/python/target/.tox/py27/local/lib/python2.7/site-packages/requests/adapters.py",
 line 497, in send
    raise SSLError(e, request=request)
requests.exceptions.SSLError: [Errno 1] _ssl.c:504: error:14090086:SSL 
routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
{noformat}

> Measure and report code coverage in Python-SDK's unit tests
> -----------------------------------------------------------
>
>                 Key: BEAM-1685
>                 URL: https://issues.apache.org/jira/browse/BEAM-1685
>             Project: Beam
>          Issue Type: Sub-task
>          Components: sdk-py
>            Reporter: Tibor Kiss
>            Assignee: Tibor Kiss
>            Priority: Minor
>
> During the execution of the Python UTs the test coverage should be measured. 
> The results should be shown on screen & posted to coveralls.io page.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to