Mercurial > hg
comparison tests/test-phabricator.t @ 44716:ed81fa859426
tests: move the phabricator auth token to the global config file
The next commit introduces a new repo to simplify its development. This value
needs to be modified to record tests, so it doesn't make sense to have to do
that twice. The callsign and URL are *not* moved because there are tests that
fallback to the .arcconfig file when those aren't present.
Differential Revision: https://phab.mercurial-scm.org/D8390
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Wed, 08 Apr 2020 17:07:19 -0400 |
parents | 38f7b2f02f6d |
children | 3dc6a70779f2 |
comparison
equal
deleted
inserted
replaced
44715:38f7b2f02f6d | 44716:ed81fa859426 |
---|---|
1 #require vcr | 1 #require vcr |
2 $ cat >> $HGRCPATH <<EOF | 2 $ cat >> $HGRCPATH <<EOF |
3 > [extensions] | 3 > [extensions] |
4 > phabricator = | 4 > phabricator = |
5 > | |
6 > [auth] | |
7 > hgphab.schemes = https | |
8 > hgphab.prefix = phab.mercurial-scm.org | |
9 > # When working on the extension and making phabricator interaction | |
10 > # changes, edit this to be a real phabricator token. When done, edit | |
11 > # it back. The VCR transcripts will be auto-sanitised to replace your real | |
12 > # token with this value. | |
13 > hgphab.phabtoken = cli-hahayouwish | |
5 > | 14 > |
6 > [phabricator] | 15 > [phabricator] |
7 > debug = True | 16 > debug = True |
8 > EOF | 17 > EOF |
9 $ hg init repo | 18 $ hg init repo |
10 $ cd repo | 19 $ cd repo |
11 $ cat >> .hg/hgrc <<EOF | 20 $ cat >> .hg/hgrc <<EOF |
12 > [phabricator] | 21 > [phabricator] |
13 > url = https://phab.mercurial-scm.org/ | 22 > url = https://phab.mercurial-scm.org/ |
14 > callsign = HG | 23 > callsign = HG |
15 > | |
16 > [auth] | |
17 > hgphab.schemes = https | |
18 > hgphab.prefix = phab.mercurial-scm.org | |
19 > # When working on the extension and making phabricator interaction | |
20 > # changes, edit this to be a real phabricator token. When done, edit | |
21 > # it back. The VCR transcripts will be auto-sanitised to replace your real | |
22 > # token with this value. | |
23 > hgphab.phabtoken = cli-hahayouwish | |
24 > EOF | 24 > EOF |
25 $ VCR="$TESTDIR/phabricator" | 25 $ VCR="$TESTDIR/phabricator" |
26 | 26 |
27 Error is handled reasonably. We override the phabtoken here so that | 27 Error is handled reasonably. We override the phabtoken here so that |
28 when you're developing changes to phabricator.py you can edit the | 28 when you're developing changes to phabricator.py you can edit the |