Page MenuHomePhabricator

Quibble should export an environment variable with the database type
Closed, DeclinedPublic

Description

e.g. MW_DB_TYPE with a value of mysql, postgres, or sqlite. That way, tests can check to see which db type is being used, and api-testing tests could conditionally skip tests that are known not to work with SQLite (T322716).

Event Timeline

Maybe it is easier to query the MediaWiki action API (action=query&meta=siteinfo&format=json) which has the database type:

{
        "general": {
            "dbtype": "mysql",

Example: https://www.mediawiki.org/wiki/Special:ApiSandbox#action=query&format=json&prop=&meta=siteinfo&continue=&titles=Main%20Page&formatversion=2&siprop=general

That saves us from having to add extra environment variables injected by Quibble and released a new version of it whenever a value has to be passed.

I am guessing it is probably straight forward to do within Platform Team Initiatives (API Integration Tests) (https://gerrit.wikimedia.org/r/mediawiki/tools/api-testing ).

Yeah, that makes sense. Let's do that.