Page MenuHomePhabricator

Test that Wikibase/Wikidata namespaces declare their content model
Closed, ResolvedPublic5 Estimated Story Points

Description

To prevent T288724 from happening again, we should test at some level that entity namespaces have the right "defaultcontentmodel" in the action=query&meta=siteinfo&siprop=namespaces API response, since Pywikibot and probably others rely on this information.

A browser test or API integration test is probably the best option for this, though I’m not sure if we can make those tests work on any wiki, even if it doesn’t have local entities (e.g. how Commons is a Wikibase repository but has no namespaces with wikibase-item or wikibase-property default content model). If all else fails, we could write a test that specifically targets Wikidata (where we know the right namespaces), and run it nightly against (Beta) Wikidata.

https://github.com/wikimedia/Wikibase/tree/master/tests/api-testing

Acceptance criteria 🏕️🌟(18 August 2021)

  • API integration test for Wikibase covering the defaultcontentmodel case

Event Timeline

@Lucas_Werkmeister_WMDE Do you think a test against a production site (or beta) is the right path forward here?
Or would we also test the same case if we had an API integration test within wikibase checking the output of this API for the default wikibase settings?

Well, the question is if we’re happy to have tests that work in the default / CI configuration but might break depending on local configuration, I guess?

And since we already have other API integration tests that require certain settings (data value normalization is currently off by default; Lua must be installed), I guess we are. So an API integration test is probably an acceptable option here.

Addshore set the point value for this task to 5.

Change 715210 had a related patch set uploaded (by Lucas Werkmeister (WMDE); author: Lucas Werkmeister (WMDE)):

[mediawiki/extensions/Wikibase@master] Add API integration tests for namespace default content models

https://gerrit.wikimedia.org/r/715210

Change 715210 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@master] Add API integration tests for namespace default content models

https://gerrit.wikimedia.org/r/715210