Problem/Motivation

In #3231950: Split Database tests in 'core' ones and 'driver specific' ones, most database-specific kernel tests were moved to the driver modules.

However, there are still some tests in the base Database kernel tests where checks are executed conditionally on the driver()/databaseType() results:

Drupal\KernelTests\KernelTestBaseTest
Drupal\Tests\system\Kernel\Scripts\DbCommandBaseTest
Drupal\Tests\system\Kernel\Scripts\DbDumpCommandTest
Drupal\KernelTests\Core\Database\SchemaTest
Drupal\KernelTests\Core\Command\DbDumpTest

Proposed resolution

Extrapolate those tests into appropriate module kernel test classes extending DriverSpecificDatabaseTestBase.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Issue fork drupal-3315604

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

mondrake created an issue. See original summary.

mondrake’s picture

Issue summary: View changes
Status: Active » Needs review
daffie’s picture

Status: Needs review » Reviewed & tested by the community

All test changes look good to me.
The database driver specific testing has been moved to the specific database drivers module.
For me is it RTBC.

@mondrake: Thank you for this issue and the MR.

  • catch committed 2c7f2fb on 10.0.x
    Issue #3315604 by mondrake, daffie: Move remaining database specific...
  • catch committed 04fefc1 on 10.1.x
    Issue #3315604 by mondrake, daffie: Move remaining database specific...
catch’s picture

Version: 10.1.x-dev » 10.0.x-dev
Status: Reviewed & tested by the community » Fixed

I noticed some nits in comments etc., but they're moved one-to-one from one file to another (and only once, it's not that we're copying the same mistake to additional places), so rather than derail this I'm holding my tongue. Everything else looks good and nice to clean this up.

Committed/pushed to 10.1.x and 10.0.x, thanks!

mondrake’s picture

@catch if you can please add comments about the nits to the MR - I think it would be good to cleanup in a follow up. These tests are pretty old and would benefit some care.

Status: Fixed » Closed (fixed)

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