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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

boombatower’s picture

Status: Active » Postponed (maintainer needs more info)

Sounds 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.

Freso’s picture

Well, 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.

boombatower’s picture

Https 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?

Anonymous’s picture

We 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

boombatower’s picture

@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.

obsidiandesign’s picture

I'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:

				CURLOPT_SSL_VERIFYPEER => FALSE,
				CURLOPT_SSL_VERIFYHOST => FALSE,

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.

boombatower’s picture

Since SimpleTest isn't intended to run on production servers that may work. Any opinions?

Damien Tournoud’s picture

Good enough for me. We have no need to validate certificates in that scenario.

obsidiandesign’s picture

Status: Postponed (maintainer needs more info) » Needs review
FileSize
750 bytes

Attached 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).

Dries’s picture

Status: Needs review » Fixed

Committed to CVS HEAD. Thanks.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

mmwus’s picture

HTTP 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.

Dave Reid’s picture

mmwus, 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.