Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests for rest.py fail in Travis because of API rate limiting #268

Open
boegel opened this issue Jun 4, 2018 · 0 comments
Open

tests for rest.py fail in Travis because of API rate limiting #268

boegel opened this issue Jun 4, 2018 · 0 comments

Comments

@boegel
Copy link
Member

boegel commented Jun 4, 2018

ERROR: Test all request methods
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/travis/build/hpcugent/vsc-base/test/rest.py", line 74, in test_request_methods
    status, body = self.client.head()
  File "lib/vsc/utils/rest.py", line 128, in head
    return self.request(self.HEAD, url, None, headers)
  File "lib/vsc/utils/rest.py", line 175, in request
    conn = self.get_connection(method, url, body, headers)
  File "lib/vsc/utils/rest.py", line 206, in get_connection
    connection = self.opener.open(request)
  File "/opt/python/2.6.9/lib/python2.6/urllib2.py", line 397, in open
    response = meth(req, response)
  File "/opt/python/2.6.9/lib/python2.6/urllib2.py", line 510, in http_response
    'http', request, response, code, msg, hdrs)
  File "/opt/python/2.6.9/lib/python2.6/urllib2.py", line 435, in error
    return self._call_chain(*args)
  File "/opt/python/2.6.9/lib/python2.6/urllib2.py", line 369, in _call_chain
    result = func(*args)
  File "/opt/python/2.6.9/lib/python2.6/urllib2.py", line 518, in http_error_default
    raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
HTTPError: HTTP Error 403: Forbidden

We can fix this by using a GitHub token in Travis, and skip the tests that require a token when the token is missing (token will never be available when testing PRs because of security reasons).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant