Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The failings reported in #264836: Bike shed test fails (PostgreSQL?) turned out to be two issues: one being PostgreSQL related, the other being due to accessing the local development and testing site through HTTPS. Apparently, when SimpleTest does a GET to a HTTPS page, it'll have 0 byte returned, which will obviously make any assertions, of anything being there, fail.
Comment | File | Size | Author |
---|---|---|---|
#9 | drupal_web_test_case_no_ca_check.patch | 750 bytes | obsidiandesign |
Comments
Comment #1
boombatower CreditAttribution: boombatower commentedSounds like cURL isn't working on the https protocol. Is this something we need to support?
If not sounds like a lot of extra hassle.
Comment #2
Freso CreditAttribution: Freso commentedWell, if Drupal should be able to run under HTTPS, so should the tests. (Otherwise, it'd be like saying Drupal supports PostgreSQL or IIS - but the tests won't run in such environments!) Of course, if "we" don't care about having Drupal served through HTTPS, then there's no need for having the tests support it either.
Comment #3
boombatower CreditAttribution: boombatower commentedHttps is just a transfer protocol and shouldn't effect the tests or the results unless https it self is broken.
So unless it is simple to fix...I don't see much point.
Anyone want to look into this?
Comment #4
Anonymous (not verified) CreditAttribution: Anonymous commentedWe are trying to run tests on a drupal site using https, and it's a requirement from our client, so I can see the point very clearly from where I stand ;-) Can you give me some idea of where I might start to look if I want to fix the problem?
Thanks,
Doug Gough
Comment #5
boombatower CreditAttribution: boombatower commented@duggoff: I haven't looked into it, but I assume it has to do with cURL and handling the encryption. Try making a test page and just loading a page on your site from cURL. If it works then report back and we need to look into it, otherwise read up on cURL.
Comment #6
obsidiandesign CreditAttribution: obsidiandesign commentedI've run into this issue using XAMPP on windows. Because it's a self-signed certificate, curl does not recognize it. To get the tests to pass, you have to override the CA server check in php/curl through simpletest\drupal_web_test_case.php. This can be done by adding the following two lines inside the $curl_options array:
I can provide a patch if it helps, but I really don't know of a way to get the HTTPS tests to run on a self-signed certificate without affecting other real certificates. I wouldn't recommend adding this to drupal_web_test_case.php for normal use, since it only applies to local devel servers' certificates that are self-generated.
Comment #7
boombatower CreditAttribution: boombatower commentedSince SimpleTest isn't intended to run on production servers that may work. Any opinions?
Comment #8
Damien Tournoud CreditAttribution: Damien Tournoud commentedGood enough for me. We have no need to validate certificates in that scenario.
Comment #9
obsidiandesign CreditAttribution: obsidiandesign commentedAttached patch incorporates the changes in #5; I didn't realize that simpletest didn't have to run on production servers (I'm still new at the whole testing/review process, but trying to help out).
Comment #10
Dries CreditAttribution: Dries commentedCommitted to CVS HEAD. Thanks.
Comment #11
Anonymous (not verified) CreditAttribution: Anonymous commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #12
mmwus CreditAttribution: mmwus commentedHTTP request status Fails
Your system or network configuration does not allow Drupal to access web pages, resulting in reduced functionality. This could be due to your webserver configuration or PHP settings, and should be resolved in order to download information about available updates, fetch aggregator feeds, sign in via OpenID, or use other network-dependent services.
what does this mean? i am having sh*t hell with this drupal
and i was told it was simple ... 3.5 weeks of my life gone and
now this message. also, can't figure out how to get the damn
login/register setup. on verge of looking for something else.
Comment #13
Dave Reidmmwus, first, please tone it back, or you will find people are less inclined to help you with your problems. Second, this is an issue strictly pertaining to HTTPS requests and unit testing. Please file a new issue for the version of Drupal you are using. Or post in the forums for help.
Most commonly, that message means that your hosting provider or PHP configuration has the php.ini value 'allow_url_fopen' disabled, and so Drupal cannot make requests to other websites outside your site like the examples in the message. Contact your webhost to see if they can enable that option for you.