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)
Tue, Nov 26, 4:56 PM
Unknown Object (File)
Mon, Nov 25, 10:11 PM
Unknown Object (File)
Mon, Nov 25, 7:26 PM
Unknown Object (File)
Thu, Nov 21, 1:43 PM
Unknown Object (File)
Wed, Nov 13, 2:21 AM
Unknown Object (File)
Sun, Nov 10, 8:32 PM
Unknown Object (File)
Sat, Nov 9, 4:25 AM
Unknown Object (File)
Fri, Nov 1, 2:21 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
Branch
master
Lint
Lint Passed
SeverityLocationCodeMessage
Advicesrc/unit/engine/phutil/ArcanistPhutilTestCase.php:620XHP16TODO Comment
Unit
No Test Coverage
Build Status
Buildable 5687
Build 5706: [Placeholder Plan] Wait for 30 Seconds

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.