Page MenuHomePhabricator

Improve getLink method for unit tests
ClosedPublic

Authored by joshuaspence on May 3 2015, 7:00 AM.
Tags
None
Referenced Files
F14095035: D12664.diff
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
Unknown Object (File)
Oct 18 2024, 2:58 PM
Unknown Object (File)
Oct 13 2024, 3:34 PM

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.