Problem/Motivation
\Drupal\FunctionalTests\Update\UpdatePathTestBase does not support the $configSchemaCheckerExclusions
property.
During regular testing it's possible to skip specific configuration by listing them in the $configSchemaCheckerExclusions
property.
Proposed resolution
Add this functionality so that contrib update tests can leverage it. Specifically the update test for the Media Entity module to using core's Media module. At the moment it is not possible to support the schema for media.type.image because of how the media entity image exif module replaces the core media type class. Rather than try and fix this in media entity image exif module first we should allow modules to have tests that skip schema checking because whilst it is valuable - so it is a working update path test.
Remaining tasks
User interface changes
None
API changes
None
Data model changes
None
Release notes snippet
N/a
Comment | File | Size | Author |
---|---|---|---|
#13 | 3062556-8.7.x.patch | 2.18 KB | alexpott |
#13 | 3062556-follow-up.patch | 852 bytes | alexpott |
#5 | 3062556-5.patch | 2.1 KB | alexpott |
#5 | 3062556-5.test-only.patch | 928 bytes | alexpott |
#4 | 3062556-4.patch | 1.19 KB | alexpott |
Comments
Comment #2
alexpottHere's patch I've tested it whilst re-enable the media entity update test.
Comment #3
phenaproximaOnly two nits, probably needs tests too...?
Nit: over 80 characters.
We should always pass TRUE as the third argument to in_array().
Comment #4
alexpottAh realised we shouldn't do the $strcitConfigSchema thing - this is false for all update tests. That's why there's this extra config schema checking in \Drupal\FunctionalTests\Update\UpdatePathTestBase::runUpdates(). So what we need to do is to support
$configSchemaCheckerExclusions
property.Comment #5
alexpottRe #3 and the question about tests. Worked out a simple way to prove that we now obey the property.
The test only patch is the interdiff.
Comment #8
chr.fritschThis looks good to me. We have a test and https://www.drupal.org/project/media_entity/issues/3062560#comment-13152099 already leverages that functionality and shows that it works.
Comment #9
catchCommitted 54f8eb6 and pushed to 8.8.x. Thanks!
Comment #11
catchRTBC for 8.7.x for after the freeze.
Comment #12
larowlanThese comments are copy/pasted from the method above.
Are we sure we want a whole new update test just for this - especially one that updates from 8.0 standard?
Comment #13
alexpottHere's a quick follow-up and a new patch for 8.7.x.
Comment #14
alexpottCrediting @larowlan
Comment #15
alexpottThis test doesn't really fit in the scope of any of the other tests in UpdatePathTestBaseTest unfortunately. What's also interesting is this test is also run as part of UpdatePathTestBaseFilledTest due to class inheritance.
Comment #16
catchCommitted/pushed both the follow-up and the 8.7.x patch, thanks!