- Issue created by @murz
- 🇦🇲Armenia murz Yerevan, Armenia
Here https://git.drupalcode.org/project/drupal/-/blob/3465f9c17f916f54dc64b08... is the place in Drupal Core where it tries to detect the simpletest environment.
- 🇪🇸Spain fjgarlin
It seems that
drupalInstall
sets that variable here https://git.drupalcode.org/project/drupal/-/blob/11.x/core/tests/Drupal/...Not sure why it's not detected.
- 🇦🇲Armenia murz Yerevan, Armenia
It seems that drupalInstall sets that variable here https://git.drupalcode.org/project/drupal/-/blob/11.x/core/tests/Drupal/...
Not sure why it's not detected.
It sets the cookie, not the env variable:
this.url(process.env.DRUPAL_TEST_BASE_URL).setCookie({ name: 'SIMPLETEST_USER_AGENT', // Colons need to be URL encoded to be valid. value: encodeURIComponent(installData.user_agent), path: url.pathname, });
And even it it will set the env variable, it will be per-process and disappear after the process ends, I afraid.
- 🇦🇲Armenia murz Yerevan, Armenia
Created an issue in Drupal Core to fix this: 🐛 Nightwatch command drupalInstall doesn't set the user_agent environment variable with the simpletest site instance Active - waiting for a fix there.
- 🇪🇸Spain fjgarlin
Thanks so much for the core issue and MR. Hopefully it's a quick one and it will go through, but if it takes longer we can always set the env variable for the nightwatch job in this part of the code: https://git.drupalcode.org/project/gitlab_templates/-/blob/main/includes...
I'd rather have that fixed in core, so leaving as postponed and the above would be a plan B.