-
Notifications
You must be signed in to change notification settings - Fork 51
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
actually return headers when http method is HEAD #276
Conversation
@migueldiascosta can you bump the version in setup.py ? |
@stdweird done. I can submit the same change to the |
@migueldiascosta thanks |
@stdweird the Also, I may be missing something but isn't this github rate limiting or something related? If not, I'll come back for a better look |
Could definitely be related to rate limiting, we haven't set up a GitHub token for the tests in Travis like we have for EasyBuild (but we'd also need to disable tests for PRs that require a token, since tokens are not available for testing PRs in Travis, to avoid that they leak on automatic testing of PRs). |
@boegel @stdweird I think the rollback confirms that the problem is not with my change also, running the tests manually with If that's the case, I can bring back my change, update the test to also check thad |
@migueldiascosta Can you please re-instate the fix (by just removing the rollback commit + The problem is indeed that we don't have a token in place for GitHub, see also #268. It's not trivial to put that in place though, and it won't fix the problem for PRs anyway (unless we skip tests that fail because of rate limiting). We can work around it temporarily by retriggering the tests in Travis that broke because of rate limiting, for now (as we've done in other recent PRs). |
10c3b54
to
53d9c7e
Compare
@boegel done what about also testing if head() is indeed returning the headers? something like """Test all request methods"""
status, body = self.client.head()
self.assertEqual(status, 200)
+ self.assertTrue(body)
+ self.assertIn('X-GitHub-Media-Type', body)
try:
status, body = self.client.user.emails.post(body='[email protected]')
self.assertTrue(False, 'posting to unauthorized endpoint did not trhow a http error') |
@migueldiascosta Enhancing the tests to cover the change you made makes a lot of sense, so please do! Tests are OK now after re-triggering them, which shows the only problem is the GitHub rate limiting... |
Green light now from Travis after a bit of patience & re-triggering tests, thanks @migueldiascosta! |
@migueldiascosta thanks |
@migueldiascosta nvm that last remark, my firefox did someting stupid |
@boegel shall I submit a PR to the |
@migueldiascosta Please do! |
the message body when using the http HEAD method is empty, this change allows the head() method to actually return the headers (easybuilders/easybuild-framework#2553 (comment))