Page MenuHomePhabricator

MW Database tests should cover when a database name contains dashes
Open, LowPublic

Description

To catch stuff like T204423: MW 1.31 install reports "InvalidArgumentException ... DatabaseDomain.php: Domain has too few or too many parts ". Dashes are special because of how DatabaseDomain handles them, so I think it's worth integrating into quibble.

Event Timeline

hashar triaged this task as Low priority.Apr 8 2019, 5:40 PM

Is this something a limited or partially mocked integration test could catch instead?

I don't mind whether Quibble uses it or not (either is fine I suppose), but it tends to scale better and benefit other run-times' test coverage if we "test" it directly.

Indeed, sounds better to have some test written for DatabaseDomain :)

Krinkle renamed this task from Quibble should create database names with dashes in them to MW Database tests should cover when a database name contains dashes.Jun 9 2019, 4:38 PM
Krinkle edited projects, added: MediaWiki-libs-Rdbms; removed: Quibble.
Krinkle moved this task from Untriaged to Rdbms library on the MediaWiki-libs-Rdbms board.
Krinkle added a project: patch-welcome.
Krinkle added a subscriber: kostajh.

A unit tests for DatabaseDomain might be too low-level, a slightly higher-level of integration (whilst still not requiring an actual database) might be better.

But, it depends on whether the original issue would've been prevented. Perhaps a test case for DatabaseDomain would suffice, in which case that should suffice for this task as well.