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

daniel created this task.Jan 30 2020, 11:51 PM
Anomie added a project: MediaWiki-API.EditedFeb 3 2020, 3:52 PM
Anomie added a subscriber: Anomie.

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)
daniel updated the task description. (Show Details)Feb 3 2020, 4:00 PM

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.

daniel added a comment.Feb 5 2020, 8:32 PM

@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.

Jdforrester-WMF removed Jdforrester-WMF as the assignee of this task.Feb 5 2020, 9:33 PM

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

Aklapper removed a subscriber: Anomie.Oct 16 2020, 5:01 PM