Running the upgrade path tests with an XDEBUG_SESSION cookie causes issue because it overrides the cookie set in UpgradePathTestBase::prepareD8Session() which means that upgrades can not run because the user is not authenticated.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

alexpott’s picture

Status: Active » Needs review
FileSize
2.84 KB

This patch fixes it by introducing a protected property on WebTestBase to store cookies and then munges the cookies together in curlExec. So now you can debug upgrade path tests using xdebug and actually jump into the running upgrade code. Yay!

dawehner’s picture

Status: Needs review » Reviewed & tested by the community

I runned some tests manually and all I can say: it fixes the problem!

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 2067991.xdebug-upgrade.patch, failed testing.

alexpott’s picture

Status: Needs work » Needs review
FileSize
3.25 KB
772 bytes

Well that was find to work out! Upgrade tests will multiple test cases where failing because the curlCookie array was not being cleared after every run!

dawehner’s picture

+++ b/core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.php
@@ -176,6 +176,13 @@
+   * Cookies to set on the curl request.

I am wondering whether we should document that this potentially is about multiple not just "the" curl request.

alexpott’s picture

Sure - how about this

dawehner’s picture

Status: Needs review » Reviewed & tested by the community

Thank you!

catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed/pushed to 8.x, thanks!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.