Problem/Motivation
If an UpdatePathTestBase
-based test fails due to an error that occured while running the update, the test fails with the following message:
Behat\Mink\Exception\ExpectationException: The string "Failed:" appears in the HTML response of this page, but it should not.
That is not very helpful, it gives absolutely no clue why the update failed, even though that is visible on the update results page, right after the "Failed:" string.
Proposed resolution
Actually fetch the message from the output and use it as the test failure message.
This leads to the following message, for example:
The update failed with the following message: "Failed: Drupal\Core\Entity\EntityStorageException: Exception thrown while performing a schema update. The 'langcode' field specification does not define 'not null' as TRUE. in Drupal\Core\Entity\Sql\SqlContentEntityStorage->wrapSchemaException() (line 1480 of /Users/tobias.stoeckler/workspace/d8/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php)."
Comment | File | Size | Author |
---|---|---|---|
update-path-test-base-debug-failure.patch | 829 bytes | tstoeckler | |
Comments
Comment #2
dawehnerThat's so much nicer! Great idea
Comment #5
larowlanCommitted 7b00141 and pushed to 8.7.x. Thanks!
c/p as 03635b9b38 to 8.6.x