Phabricator/TestPlan: Difference between revisions

Jump to navigation Jump to search
Adds phab-email testing
No edit summary
(Adds phab-email testing)
Line 297: Line 297:
# When <code>hg push</code> is executed, after a period of time, the revision should automatically transition to closed.
# When <code>hg push</code> is executed, after a period of time, the revision should automatically transition to closed.
# When <code>hg backout</code> commit is pushed, after a period of time, the revision should automatically reopen.
# When <code>hg backout</code> commit is pushed, after a period of time, the revision should automatically reopen.
=== T15 - Verify that the Phabricator Email API endpoint is producing correct output ===
To verify that the <code>feed.for_email.query</code> API endpoint is still stable, we can invoke it to get the email events for
a full patch workflow. If the resulting payload hasn't changed, then we know that there hasn't been a regression.
The two patches that we are using are:
* https://phabricator-dev.allizom.org/D2942
* https://phabricator-dev.allizom.org/D2943 (secure bug)
======Note======
The events we are expecting are going to be slightly different than the "real" events that would be generated in
real-time. This is because the state of the revision (such as current reviewers, current bug, etc) are resolved
based on its status at API-call time - '''not''' its status when the event was triggered.
To avoid this inaccuracy, testing the API endpoint would require manually performing all the actions and calling
the endpoint immediately after each one, which would be very tedious.
====Test Plan====
# If you don't already have one, get an API Token for email-bot: https://phabricator-dev.allizom.org/settings/user/email-bot/page/apitokens/
# From the command-line, invoke:
<syntaxhighlight lang="bash">
$ echo '{
  "storyLimit": 39,
  "after": 6853094612582369220
}' | arc call-conduit --conduit-uri https://phabricator-dev.allizom.org/ --conduit-token api-rhtfo7yjs7n6rmdjcbmvbluv2bxz feed.for_email.query --
</syntaxhighlight>
====Results====
# The output of the last command should entirely match:
<syntaxhighlight lang="bash">
{
  "error": null,
  "errorMessage": null,
  "response": "{<todo>}"
}
</syntaxhighlight>
26

edits

Navigation menu