Mercurial > hg-stable
changeset 13423:4e60dad2261f
tests: test https through http proxy
These tests fails for me with Python 2.6(.nothing)
author | Mads Kiilerich <mads@kiilerich.com> |
---|---|
date | Wed, 16 Feb 2011 04:28:11 +0100 |
parents | ebce5196b9db |
children | 08f9c587141f |
files | tests/test-https.t |
diffstat | 1 files changed, 44 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/test-https.t Wed Feb 16 04:28:17 2011 +0100 +++ b/tests/test-https.t Wed Feb 16 04:28:11 2011 +0100 @@ -224,3 +224,47 @@ - ignores that certificate doesn't match hostname $ hg -R copy-pull id https://127.0.0.1:$HGPORT/ 5fed3813f7f5 + +Prepare for connecting through proxy + + $ kill `cat hg1.pid` + $ sleep 1 + + $ ("$TESTDIR/tinyproxy.py" $HGPORT1 localhost >proxy.log 2>&1 </dev/null & + $ echo $! > proxy.pid) + $ cat proxy.pid >> $DAEMON_PIDS + $ sleep 2 + + $ echo "[http_proxy]" >> copy-pull/.hg/hgrc + $ echo "always=True" >> copy-pull/.hg/hgrc + $ echo "[hostfingerprints]" >> copy-pull/.hg/hgrc + $ echo "localhost =" >> copy-pull/.hg/hgrc + +Test unvalidated https through proxy + + $ http_proxy=http://localhost:$HGPORT1/ hg -R copy-pull pull --insecure --traceback + pulling from https://localhost:$HGPORT/ + searching for changes + no changes found + +Test https with cacert and fingerprint through proxy + + $ http_proxy=http://localhost:$HGPORT1/ hg -R copy-pull pull --config web.cacerts=pub.pem + pulling from https://localhost:$HGPORT/ + searching for changes + no changes found + $ http_proxy=http://localhost:$HGPORT1/ hg -R copy-pull pull https://127.0.0.1:$HGPORT/ + pulling from https://127.0.0.1:$HGPORT/ + searching for changes + no changes found + +Test https with cert problems through proxy + + $ http_proxy=http://localhost:$HGPORT1/ hg -R copy-pull pull --config web.cacerts=pub-other.pem + pulling from https://localhost:$HGPORT/ + searching for changes + no changes found + $ http_proxy=http://localhost:$HGPORT1/ hg -R copy-pull pull --config web.cacerts=pub-expired.pem https://localhost:$HGPORT2/ + pulling from https://localhost:$HGPORT2/ + searching for changes + no changes found