Page MenuHomePhabricator

Improve getLink method for unit tests
ClosedPublic

Authored by joshuaspence on May 3 2015, 7:00 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Apr 29, 6:07 PM
Unknown Object (File)
Mon, Apr 29, 11:59 AM
Unknown Object (File)
Thu, Apr 25, 1:39 AM
Unknown Object (File)
Thu, Apr 11, 9:28 AM
Unknown Object (File)
Mon, Apr 1, 9:15 AM
Unknown Object (File)
Mar 27 2024, 3:05 PM
Unknown Object (File)
Mar 26 2024, 2:06 AM
Unknown Object (File)
Mar 24 2024, 7:53 AM

Details

Summary

Ref T7977. The PhutilTestCase::getLink method currently relies on arcanist projects instead of repositories. Instead, make this logic a bit smarter by looking up the base URI from phabricator.uri (currently it is hardcoded to https://secure.phabricator.com).

Ideally, we would pass ?repositories=$REPOSITORY_PHID to DiffusionSymbolController as well, but I don't know if this is worth pursuing.

Test Plan

This diff.

Diff Detail

Repository
rARC Arcanist
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

joshuaspence retitled this revision from to Improve getLink method for unit tests.
joshuaspence updated this object.
joshuaspence edited the test plan for this revision. (Show Details)
joshuaspence added reviewers: epriestley, avivey.
joshuaspence edited edge metadata.

Simplify diff, will move other stuff to a separate diff

joshuaspence edited the test plan for this revision. (Show Details)

Ok, it took me a while to understand what getLink is actually for in this code (It links to the source of the test).

The whole set looks ok to me, and is mostly technical, so .

avivey edited edge metadata.
joshuaspence edited edge metadata.

Use PhutilInvalidStateException

epriestley edited edge metadata.
This revision is now accepted and ready to land.May 19 2015, 2:10 PM
This revision was automatically updated to reflect the committed changes.