Page MenuHomePhabricator

Port Parsoid REST API test script to PHP
Closed, ResolvedPublic

Description

Current Parsoid API test script is https://phabricator.wikimedia.org/diffusion/GPAR/browse/master/tests/mocha/api.js .

It should be ported to phpunit. Alternately, a mechanism for running it against MediaWiki should be developed.


You can use the PARSOID_URL env variable to set the URL of the API (which is assumed to be identical to the JS one).

Event Timeline

Tgr claimed this task.May 1 2019, 1:17 AM
Tgr added a subscriber: Tgr.

We'll just repurpose the existing test and keep it in JS/Mocha for now.

Change 508696 had a related patch set uploaded (by Gergő Tisza; owner: Gergő Tisza):
[mediawiki/services/parsoid@master] Add env option for api.js tests to use an external endpoint

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

Change 508696 merged by jenkins-bot:
[mediawiki/services/parsoid@master] Add env option for api.js tests to use an external endpoint

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

Tgr closed this task as Resolved.May 7 2019, 10:36 PM
Tgr updated the task description. (Show Details)

@Tgr Just to confirm, this looks good, but I assume you were able to run it with a MediaWiki installation and it failed "correctly"?

Tgr updated the task description. (Show Details)May 14 2019, 10:48 AM

@EvanProdromou MediaWiki does not have a Parsoid endpoint yet, so not sure what difference it would make to run it with or without a MediaWiki install. With a custom URL, the tests fail because no content is returned from that URL.