Writing a test for #1250800: Language domain should work regardless of ports or protocols isn't easy, hence the separate issue. The problem is that we have to test https calls from inside the test framework (running on http)

Refs:
#644072: Setup a client with SSL

CommentFileSizeAuthor
#7 i1261454.patch663 bytesattiks
#1 i1261454.patch2.9 KBattiks
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

attiks’s picture

Status: Active » Needs review
FileSize
2.9 KB

Attached patch will fail:
1/ Undefined property: stdClass::$timestamp after the https login
2/ Failing test "URL (DOMAIN) > DEFAULT: default domain should get default language (HTTPS)", but while trying manually it works, so no idea for the moment, i assume it has something todo with how the fake domain name is handled

Status: Needs review » Needs work

The last submitted patch, i1261454.patch, failed testing.

attiks’s picture

Priority: Normal » Major

Testbot apparently doesn't like https requests, if someone can point me in the right direction that would be awesome.

Marking is as major to get some visibility, if needed demote it back to normal

grendzy’s picture

attiks: The testbot provided by drupal.org doesn't support HTTPS. You can however mock an HTTPS request by requesting /modules/simpletest/tests/https.php?q=...

The tests I've written for the securepages module don't use this method, so they only run on servers with real HTTPS support. Also I'm not sure how locale needs to interact with HTTPS, but you might want review #1050746: HTTPS sessions not working in all cases. Mixed sessions are really badly broken in D7.

gordon’s picture

This is going to be an issue, I am pretty sure there would be no test bot which will have https enabled.

I was thinking that you could maybe do a http request but get the system to fake it, but that would mean changing drupal, or doing something else bad, and would most likely invalidate the test.

I am not sure that this is something that you can test for. I think that what you could do is add a check for mod_ssl in apache and then try and run the test, or if you fail to connect to https then though a warning and not run the tests on the test bot, this way if there is any testbots with https enabled they will get run.

attiks’s picture

@grendzy thanks for the explanation, I was under the impression that this was handled in #644072: Setup a client with SSL, but i probably misread, also thanks for the link to #1050746: HTTPS sessions not working in all cases. I look for another way to test this.

@gordon there's some kind of proxy for https but it fakes everything so not really a solid way to test.

attiks’s picture

Status: Needs work » Needs review
FileSize
663 bytes

New test included I reverted everything, so instead of trying to test https from inside the http, I just changed the domain to https://$language_domain:99, so it will test both the protocol part as the port part of the domain name.

attiks’s picture

Status: Needs review » Closed (won't fix)
attiks’s picture

Issue summary: View changes

Updated issue summary.