Page MenuHomePhabricator

Improve getLink method for unit tests
ClosedPublic

Authored by joshuaspence on May 3 2015, 7:00 AM.
Tags
None
Referenced Files
F13233372: D12664.diff
Tue, May 21, 2:14 AM
F13206365: D12664.id.diff
Wed, May 15, 8:00 AM
F13200849: D12664.id31092.diff
Tue, May 14, 4:18 AM
F13187790: D12664.diff
Sat, May 11, 4:45 AM
F13184667: D12664.diff
Fri, May 10, 9:51 PM
F13182732: D12664.id30627.diff
Fri, May 10, 1:54 AM
Unknown Object (File)
Tue, May 7, 7:56 AM
Unknown Object (File)
Sat, May 4, 8:29 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
Unit
Tests Passed
Build Status
Buildable 5818
Build 5838: [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.