Problem/Motivation

there are a handful of tests that verify what modules are enabled under certain situations. When running the core test suite while using a non-core database, these tests fail.

There is a project to move all database drivers to their own modules. these changes will have to take place as a part of that project regardless.

Drupal\KernelTests\Core\Common\DrupalFlushAllCachesTest::testDrupalFlushAllCachesModuleList
Drupal\KernelTests\Core\Asset\ResolvedLibraryDefinitionsFilesMatchTest::testCoreLibraryCompleteness
Drupal\KernelTests\Core\Theme\Stable9LibraryOverrideTest::testStable9LibraryOverrides
Drupal\KernelTests\Core\Theme\StableLibraryOverrideTest::testStableLibraryOverrides

Steps to reproduce

Run core tests with SQL Server or another database

Proposed resolution

Modify test to check if the database connection is provided by a module, and include that module in the arrays.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Issue fork drupal-3245383

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

Beakerboy created an issue. See original summary.

daffie’s picture

I am not a 100% sure, but I think that the tests mentioned in the issue summary will pass for the SQL server when #3129043: Move core database drivers to modules of their own has landed.

beakerboy’s picture

I would hope so, but I’m not one to hold my breath that large-scale changes are actually going to happen. It would be nice to attack these small problems as they come up. One, in case the core drivers never move, and two, it’ll make that change simpler if the other pieces are already in place.

beakerboy’s picture

Status: Active » Needs review

daffie’s picture

Status: Needs review » Needs work

The MR looks good. Just a couple of small points.

beakerboy’s picture

Status: Needs work » Needs review

Improvements from @daffie have been included.

daffie’s picture

Status: Needs review » Reviewed & tested by the community

Removed all the @todo's.
It is now RTBC for me.

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

  • catch committed af2bc2f on 10.0.x
    Issue #3245383 by Beakerboy, daffie: If the database driver is provided...

  • catch committed 3ffca33 on 9.4.x
    Issue #3245383 by Beakerboy, daffie: If the database driver is provided...

  • catch committed 8125714 on 9.3.x
    Issue #3245383 by Beakerboy, daffie: If the database driver is provided...
catch’s picture

Version: 9.4.x-dev » 9.3.x-dev
Status: Reviewed & tested by the community » Fixed

It's a shame we have to repeat similar logic in a couple of places, but it generally is a couple so don't think it's worth trying to abstract it.

Committed/pushed to 10.0.x, cherry-picked to 9.4.x and 9.3.x, thanks!

Status: Fixed » Closed (fixed)

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