Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Problem/Motivation
In #3031379-114: Add a new test type to do real update testing, it was discovered that we set the base_url, but then don't use that value to relocate the installed site again. This is a problem and bug.
$base_url = $input->getOption('base-url');
then later... we should use it (currently it isn't used) so we find the right install again.
$parsed = parse_url($base_url);
$port = $parsed['port'] ?? 80;
$host = $parsed['host'] ?? 'localhost';
// Remove 'sites/' from the beginning of the path.
$site_path = substr($this->siteDirectory, 6);
$fs->appendToFile($root . '/sites/sites.php', "\$sites['$port.$host'] = '$site_path';");
Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes
Release notes snippet
Comment | File | Size | Author |
---|---|---|---|
#2 | 3087862.patch | 3.36 KB | heddn |
| |||
#2 | 3087862-tests_only.patch | 1.88 KB | heddn |
Comments
Comment #2
heddnWhile looking to updating the IS to include some more details I think I stumbled on a different issue. Possibly out of scope, but an interesting dilemma is that we have a single ENV variable. If two tests are using the same ENV variable and utilizing
TestSiteInstallCommand
, that could be a bit of a race condition.Comment #4
heddnre #2 and the interesting find about ENV variables...
TLDR; It shouldn't be a concern since the variables are locally scoped. Back to just looking at the documented IS and patches.
Comment #6
quietone CreditAttribution: quietone as a volunteer commentedTriaging issues in simpletest.module as part of the Bug Smash Initiative to determine if they should be in the Simpletest Project or core.
This looks like it a Phpunit issue, changing component.
Comment #10
smustgrave CreditAttribution: smustgrave at Mobomo commentedQueueing up #2 for 9.5 tests
Comment #11
smustgrave CreditAttribution: smustgrave at Mobomo commented#2 still passes 9.5.x
Includes a test-only patch that fails.
Looks like good additional tests which is great!
Am moving to 9.5.x
Comment #12
alexpottCommitted and pushed 16097ece55 to 10.1.x and 3660b1697d to 10.0.x and ec5cf9f6de to 9.5.x. Thanks!
Nice fix and looks safe to back port to 9.5.x. Thanks @heddn.