Mercurial > hg
annotate tests/test-http-proxy @ 7429:dbc40381620e
tests: Skip tests if they will fail because of outer repo
For different reasons these tests will fail if run in a tmpdir which is in a hg
repo.
The following three tests assumes no .hg in path dirs - I don't know how to
work around that:
* test-dispatch explicitly tests for no repo and expects "abort: There is no
Mercurial repository here (.hg not found)!"
* test-extension expects parentui to be None when not cd'ed to a repo dir
* test-globalopts tests that implicit -R works correctly - that could perhaps be
done from another repo instead of assuming no repo
The following two might be worth investigating further:
* test-convert-svn-sink fails for unknown reasons, starting with "abort:
unresolved merge conflicts (see hg resolve)"
* test-glog gets strange failures when testing "from outer space"
author | Mads Kiilerich <mads@kiilerich.com> |
---|---|
date | Thu, 27 Nov 2008 00:57:31 +0100 |
parents | 9105467b8167 |
children | 490e40816cbd |
rev | line source |
---|---|
2337
3f24bc5dee81
http: fix many problems with url parsing and auth. added proxy test.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
1 #!/bin/sh |
3f24bc5dee81
http: fix many problems with url parsing and auth. added proxy test.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
2 |
3f24bc5dee81
http: fix many problems with url parsing and auth. added proxy test.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
3 hg init a |
3f24bc5dee81
http: fix many problems with url parsing and auth. added proxy test.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
4 cd a |
3f24bc5dee81
http: fix many problems with url parsing and auth. added proxy test.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
5 echo a > a |
3f24bc5dee81
http: fix many problems with url parsing and auth. added proxy test.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
6 hg ci -Ama -d '1123456789 0' |
5384
e3a0c092b4e2
Allow tests to run in parallel.
Bryan O'Sullivan <bos@serpentine.com>
parents:
3015
diff
changeset
|
7 hg --config server.uncompressed=True serve -p $HGPORT -d --pid-file=hg.pid |
2571
83cfd95eafb5
tests: add timeouts, make run-tests.py clean up dead daemon processes
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2542
diff
changeset
|
8 cat hg.pid >> $DAEMON_PIDS |
2337
3f24bc5dee81
http: fix many problems with url parsing and auth. added proxy test.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
9 |
3f24bc5dee81
http: fix many problems with url parsing and auth. added proxy test.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
10 cd .. |
5384
e3a0c092b4e2
Allow tests to run in parallel.
Bryan O'Sullivan <bos@serpentine.com>
parents:
3015
diff
changeset
|
11 ("$TESTDIR/tinyproxy.py" $HGPORT1 localhost >proxy.log 2>&1 </dev/null & |
2337
3f24bc5dee81
http: fix many problems with url parsing and auth. added proxy test.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
12 echo $! > proxy.pid) |
2571
83cfd95eafb5
tests: add timeouts, make run-tests.py clean up dead daemon processes
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2542
diff
changeset
|
13 cat proxy.pid >> $DAEMON_PIDS |
2337
3f24bc5dee81
http: fix many problems with url parsing and auth. added proxy test.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
14 sleep 2 |
3f24bc5dee81
http: fix many problems with url parsing and auth. added proxy test.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
15 |
2612
ffb895f16925
add support for streaming clone.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2571
diff
changeset
|
16 echo %% url for proxy, stream |
5384
e3a0c092b4e2
Allow tests to run in parallel.
Bryan O'Sullivan <bos@serpentine.com>
parents:
3015
diff
changeset
|
17 http_proxy=http://localhost:$HGPORT1/ hg --config http_proxy.always=True clone --uncompressed http://localhost:$HGPORT/ b | \ |
3015
fa4229c60dd7
Allow for MB/sec transfer rates in test-http-proxy and test-ssh.
Lee Cantey <lcantey@gmail.com>
parents:
2622
diff
changeset
|
18 sed -e 's/[0-9][0-9.]*/XXX/g' -e 's/[KM]\(B\/sec\)/X\1/' |
2612
ffb895f16925
add support for streaming clone.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2571
diff
changeset
|
19 cd b |
ffb895f16925
add support for streaming clone.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2571
diff
changeset
|
20 hg verify |
ffb895f16925
add support for streaming clone.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2571
diff
changeset
|
21 cd .. |
ffb895f16925
add support for streaming clone.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2571
diff
changeset
|
22 |
ffb895f16925
add support for streaming clone.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2571
diff
changeset
|
23 echo %% url for proxy, pull |
5384
e3a0c092b4e2
Allow tests to run in parallel.
Bryan O'Sullivan <bos@serpentine.com>
parents:
3015
diff
changeset
|
24 http_proxy=http://localhost:$HGPORT1/ hg --config http_proxy.always=True clone http://localhost:$HGPORT/ b-pull |
2612
ffb895f16925
add support for streaming clone.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2571
diff
changeset
|
25 cd b-pull |
ffb895f16925
add support for streaming clone.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2571
diff
changeset
|
26 hg verify |
ffb895f16925
add support for streaming clone.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2571
diff
changeset
|
27 cd .. |
2337
3f24bc5dee81
http: fix many problems with url parsing and auth. added proxy test.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
28 |
3f24bc5dee81
http: fix many problems with url parsing and auth. added proxy test.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
29 echo %% host:port for proxy |
5384
e3a0c092b4e2
Allow tests to run in parallel.
Bryan O'Sullivan <bos@serpentine.com>
parents:
3015
diff
changeset
|
30 http_proxy=localhost:$HGPORT1 hg clone --config http_proxy.always=True http://localhost:$HGPORT/ c |
2337
3f24bc5dee81
http: fix many problems with url parsing and auth. added proxy test.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
31 |
3f24bc5dee81
http: fix many problems with url parsing and auth. added proxy test.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
32 echo %% proxy url with user name and password |
5384
e3a0c092b4e2
Allow tests to run in parallel.
Bryan O'Sullivan <bos@serpentine.com>
parents:
3015
diff
changeset
|
33 http_proxy=http://user:passwd@localhost:$HGPORT1 hg clone --config http_proxy.always=True http://localhost:$HGPORT/ d |
2337
3f24bc5dee81
http: fix many problems with url parsing and auth. added proxy test.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
34 |
3f24bc5dee81
http: fix many problems with url parsing and auth. added proxy test.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
35 echo %% url with user name and password |
5384
e3a0c092b4e2
Allow tests to run in parallel.
Bryan O'Sullivan <bos@serpentine.com>
parents:
3015
diff
changeset
|
36 http_proxy=http://user:passwd@localhost:$HGPORT1 hg clone --config http_proxy.always=True http://user:passwd@localhost:$HGPORT/ e |
2337
3f24bc5dee81
http: fix many problems with url parsing and auth. added proxy test.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
37 |
3f24bc5dee81
http: fix many problems with url parsing and auth. added proxy test.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
38 echo %% bad host:port for proxy |
5384
e3a0c092b4e2
Allow tests to run in parallel.
Bryan O'Sullivan <bos@serpentine.com>
parents:
3015
diff
changeset
|
39 http_proxy=localhost:$HGPORT2 hg clone --config http_proxy.always=True http://localhost:$HGPORT/ f |
2337
3f24bc5dee81
http: fix many problems with url parsing and auth. added proxy test.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
40 |
7269
95a53961d7a6
httprepo: factor out proxy handling
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
7264
diff
changeset
|
41 echo %% do not use the proxy if it is in the no list |
95a53961d7a6
httprepo: factor out proxy handling
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
7264
diff
changeset
|
42 http_proxy=localhost:$HGPORT1 hg clone --config http_proxy.no=localhost http://localhost:$HGPORT/ g |
95a53961d7a6
httprepo: factor out proxy handling
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
7264
diff
changeset
|
43 |
7268
e05092a3c2fe
test-http-proxy: hide logged URL port number, works with--jobs
Patrick Mezard <pmezard@gmail.com>
parents:
7264
diff
changeset
|
44 cat proxy.log | sed -e 's/^.*\] /XXX /' -e 's/:[0-9][0-9]*/:/' |
2337
3f24bc5dee81
http: fix many problems with url parsing and auth. added proxy test.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
45 exit 0 |