Page MenuHomePhabricator

Expose flags for controlling API tests from the action API
Open, Needs TriagePublic

Description

The action API should allow extensions to expose flags that control API tests via an appropriate hook. The intent is to allow tests to decide whether they need to be skipped based on the flags set by extensions. For instance, the ConfirmEdit extension could set a "captcha" flag, and any test relying on anonymous edits could mark itself as skipped based on that.

In addition, the action API should expose a single flag that is required by the API test framework. This flag would be based on a config variable, set in DevelopmentSettings.php. If this flag is absent, API integration tests should refuse to run. The intention is to protect production wikis from accidental pollution with test data.

Event Timeline

Anomie subscribed.

Rather than just one core flag, a whole new siprop might be more appropriate for the purpose that seems needed by T243976.

Or perhaps a whole separate meta module, since siteinfo is already rather overgrown.

daniel renamed this task from Expose flags for controlling API tests from the siteinfo API module to Expose flags for controlling API tests from the action API .Feb 3 2020, 3:57 PM
daniel updated the task description. (Show Details)

Rather than just one core flag, a whole new siprop might be more appropriate for the purpose that seems needed by T243976.

I agree. I removed the "siteinfo" bit from the description, and explain the intent a bit more.

@Jdforrester-WMF I don't remember why I put your name on this. Might have been an accident. If you are waiting for CPT (me) to work on this, please unassing yourself.

Yeah, happy to help with this but it probably should be owned more directly by CPT.

Aklapper removed a subscriber: Clarakosi.

Adding missing MediaWiki-Core-Tests code project tag as Platform Team Initiatives (API Integration Tests) team tag is archived and its parent Platform Engineering team does not exist anymore