Closed (fixed)
Project:
Drupal core
Version:
7.x-dev
Component:
tests
Priority:
Critical
Category:
Bug report
Reporter:
Created:
17 Aug 2008 at 08:10 UTC
Updated:
21 Sep 2008 at 15:22 UTC
Jump to comment: Most recent, Most recent file
Assert that if you drupal_http_request a page and that issues a 301, 302, 307 response code then it's redirected properly if and only if when the appropriate parameter is passed to drupal_http_request /
| Comment | File | Size | Author |
|---|---|---|---|
| #20 | 296310-what-about-reading-tests.patch | 3.14 KB | damien tournoud |
| #10 | system_test.patch | 7.99 KB | mustafau |
| #9 | system_test.patch | 4.97 KB | Anonymous (not verified) |
| #6 | drupal_request.patch | 4.35 KB | boombatower |
| #3 | drupal_request.patch | 5.28 KB | boombatower |
Comments
Comment #1
floretan commented#296307: TestingParty08: drupal_http_request basic auth needs a test already sets up a dummy module for drupal_http_request. That patch can probably be used as a starting point for the current issue.
Comment #2
Anonymous (not verified) commentedThis is the patch adding the tests (I started working during the testing party, but didn't finish it on time). I have included the above mentioned patch.
If there are any comments regarding the code quality (or anything else for that matter), please let me know.
Comment #3
boombatower commentedFew very minor things:
Implementation of setUp().to added setUp() method.Test looks good, ran test and it passes.
Comment #4
boombatower commentedThis patch includes the test by flobruit and nickske from: #296307: TestingParty08: drupal_http_request basic auth needs a test which I have marked as a duplicate.
Comment #5
dmitrig01 commentedthe .module should be:
Comment #6
boombatower commentedSure, that is cleaner. Missing 'page arguments', but otherwise it works.
Comment #7
dries commented* I'm not sure we should create a dedicated module for this test. It feels like it would be better to create a more generic system_test.module or something along these lines.
* We don't use underscores in URLs. Use dashes instead, and consider to shorten the URLs.
Comment #8
Anonymous (not verified) commentedI'm on it - will fix this soon.
Comment #9
Anonymous (not verified) commentedOk, I've created a system_test module, that does all the support work. The patch includes the changes made in #296299: TestingParty08: drupal_get_destination with a query needs a test and #296307: TestingParty08: drupal_http_request basic auth needs a test.
Looking forward to any replies regarding the code quality. (or anything else for that matter)
Comment #10
mustafau commentedExtended tests with parameter "$retry" set to "0".
Added redirect to invalid URL tests.
Comment #11
boombatower commentedTests look thorough, pass, and now use a standard system_test.module.
Looks like good work.
Test results:
Comment #12
dries commentedExcellent. Thanks for incorporating my feedback so quickly. Committed to CVS HEAD. Thanks ...
Comment #13
webchickI get unresponsive script errors whenever I run this test in FF3 on OSX. Didn't get a chance to look more closely at it yet.
Comment #14
webchickI looked in the simpletest table in the database. This is the last row to get inserted before it times out:
"The query passed to the page is correctly represented by drupal_get_detination()."
It's very strange, because that's the last assertion in common.test. I tried commenting its parent function, testDrupalGetDestination(), out but no dice.
Comment #15
Anonymous (not verified) commentedReally strange. The tests work fine for me (FF3 under linux). Can anybody else reproduce this problem? Coudl it be not due to the test itself? Do any other tests cause this?
Comment #16
boombatower commentedRuns fine FF3 SUSE 11.0 (linux).
Comment #17
boombatower commentedComment #18
webchickI'll try digging in and debugging this tonight. Good to know Linux is unaffected. I'll see if I can scrounge up some Mac users to test.
Comment #19
boombatower commentedhttp://drupal.org/node/250047#comment-996555
Comment #20
damien tournoud commentedOh, god, that test was *silly*.
Come on! That's a "if there is a bug, print that there is none".
@webchick: what you were experiencing are notices in drupal_http_request that broke the batch API somehow.
This patch fixes both drupal_http_request and the test.
Comment #21
webchickCommitted. Love it when tests find bugs. Yay! :)
Comment #22
Anonymous (not verified) commentedSorry, my bad. For some reason I thought redirect_code is supposed to return the code of the final response, which should be 200 (response of the page we redirected to).
Comment #23
boombatower commentedSweet!
Comment #24
mustafau commentedThis fix was wrong and should be reverted. The real fix to the bug is here: http://drupal.org/node/293529#comment-960905
Comment #25
damien tournoud commentedLet's this issue die peacefully. I'll answer in the other one.
Comment #26
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.