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

MediaUpdateTest is broken

$
0
0

Problem/Motivation

As discovered in #2976035: Entity type CRUD operations must use the last installed entity type and field storage definitions , \Drupal\Tests\media\Functional\Update\MediaUpdateTest does a few things wrongly:

  1. drupal-8.media-enabled.php installs live config definitions from the standard profile. That's a big no-no for upgrade path tests since the "installed site fixture" is a moving target, which makes test results completely unpredictable
  2. MediaUpdateTest::testOEmbedConfig() tries to bypass the problem described above by removing data from a config file before running the updates. That data should not have been there in the first place
  3. MediaUpdateTest::testBundlePermission() changes a role config entity via API calls before running the updates, which is not allowed/supported

Proposed resolution

- replace drupal-8.media-enabled.php with a database fixture which installs only the objects created by the Media module in Drupal 8.4.0
- add additional permissions to the authenticated role in an update fixture file instead of using API calls before running the updates
- don't change the media.settings config file before running the updates, because the database dump from above includes the correct file and data for it

Remaining tasks

Review.

User interface changes

Nope.

API changes

Nope.

Data model changes

Nope.


Viewing all articles
Browse latest Browse all 294747

Trending Articles



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