From d26116a656ea72833f2b92843e83ea0535a43c75 Mon Sep 17 00:00:00 2001 From: Alexey Murz Korepov <MurzNN@gmail.com> Date: Tue, 4 Feb 2025 11:54:12 +0400 Subject: [PATCH] Set the HTTP_USER_AGENT environment variable by the Simpletest user agent --- core/tests/Drupal/Nightwatch/Commands/drupalInstall.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/tests/Drupal/Nightwatch/Commands/drupalInstall.js b/core/tests/Drupal/Nightwatch/Commands/drupalInstall.js index 67ec1e7b2d32..f685be6ca76f 100644 --- a/core/tests/Drupal/Nightwatch/Commands/drupalInstall.js +++ b/core/tests/Drupal/Nightwatch/Commands/drupalInstall.js @@ -50,6 +50,9 @@ exports.command = function drupalInstall( value: encodeURIComponent(installData.user_agent), path: url.pathname, }); + // Set the HTTP_USER_AGENT environment variable to detect the test + // environment in the command line. + process.env.HTTP_USER_AGENT = installData.user_agent; } catch (error) { this.assert.fail(error); } -- GitLab