Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 296282

Add a new test type to do real update testing

$
0
0

Problem/Motivation

We have hit problems with the security release of 8.6.7 and the bug fix release of 8.6.8. See:

The technical reasons for each one are different but our tests that extends UpdatePathTestBase have not caught these problems. We need a way in which we can address the security issues caused by phar and the PHP bug behind #2701829: Extension objects should not implement \Serializable without causing these update woes.

The update programme - #3029353: First launch of the beta testing program - is one tack but this issue proposes to add a new test type.

General specifications for the new testing type:

  • It will not use the branch being tested as a starting codebase
  • It will not use the drupal environment to run - it will be based on Drupal's unit test case or PHP's.
  • It will install the minimum version of Drupal supported determined by our policy and the branch that is being tested \Drupal::VERSION
  • It will install Drupal codebase using composer
  • It will install Drupal somehow
  • It will log into the site as user 1
  • It will then be able to do upgrades via composer / drush / tarball?
  • It will then test the resulting upgrade.

Proposed resolution

  • Create a new test suite. We’ll call it ‘build.’
  • HTTP requests must be able to run in isolation from the system running the tests.
  • Tests must be able to run in parallel under run-tests.sh.
  • Each build test case will encapsulate a workspace in the file system, and potentially an HTTP server to allow for making requests against the assembled site.
  • Tests will be able to execute external commands on the command line, such as git or composer, in order to manipulate the workspace.
  • Tests will be able to copy the patched version of Drupal to the workspace.
  • Using the provided HTTP server, tests will be able to make a request, and assert against the results.
  • We’ll use Mink as a framework for assertions against content.

Remaining tasks

Remove the proof-of-concept tests from the patch before committing. Create followups as necessary to re-add them.

Determine which sorts of tests are out of scope for this framework.

Ensure we’re not re-running a large number of tests. See #44.

User interface changes

API changes

Data model changes

Release notes snippet


Viewing all articles
Browse latest Browse all 296282

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>