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.
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)
Comment | File | Size | Author |
---|---|---|---|
#7 | i1261454.patch | 663 bytes | attiks |
#1 | i1261454.patch | 2.9 KB | attiks |
Comments
Comment #1
attiks CreditAttribution: attiks commentedAttached 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
Comment #3
attiks CreditAttribution: attiks commentedTestbot 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
Comment #4
grendzy CreditAttribution: grendzy commentedattiks: 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.
Comment #5
gordon CreditAttribution: gordon commentedThis 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.
Comment #6
attiks CreditAttribution: attiks commented@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.
Comment #7
attiks CreditAttribution: attiks commentedNew 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.Comment #8
attiks CreditAttribution: attiks commentedTest is added to the patch in #1250800: Language domain should work regardless of ports or protocols
Comment #8.0
attiks CreditAttribution: attiks commentedUpdated issue summary.