tests/test-http-proxy
changeset 2612 ffb895f16925
parent 2570 83cfd95eafb5
child 2613 479e26afa10f
equal deleted inserted replaced
2611:1b4eb1f92433 2612:ffb895f16925
    11 ("$TESTDIR/tinyproxy.py" 20060 localhost >proxy.log 2>&1 </dev/null &
    11 ("$TESTDIR/tinyproxy.py" 20060 localhost >proxy.log 2>&1 </dev/null &
    12 echo $! > proxy.pid)
    12 echo $! > proxy.pid)
    13 cat proxy.pid >> $DAEMON_PIDS
    13 cat proxy.pid >> $DAEMON_PIDS
    14 sleep 2
    14 sleep 2
    15 
    15 
    16 echo %% url for proxy
    16 echo %% url for proxy, stream
    17 http_proxy=http://localhost:20060/ hg --config http_proxy.always=True clone http://localhost:20059/ b
    17 http_proxy=http://localhost:20060/ hg --config http_proxy.always=True clone http://localhost:20059/ b | \
       
    18   sed -e 's/[0-9][0-9.]*/XXX/g'
       
    19 cd b
       
    20 hg verify
       
    21 cd ..
       
    22 
       
    23 echo %% url for proxy, pull
       
    24 http_proxy=http://localhost:20060/ hg --config http_proxy.always=True clone --pull http://localhost:20059/ b-pull
       
    25 cd b-pull
       
    26 hg verify
       
    27 cd ..
    18 
    28 
    19 echo %% host:port for proxy
    29 echo %% host:port for proxy
    20 http_proxy=localhost:20060 hg clone --config http_proxy.always=True http://localhost:20059/ c
    30 http_proxy=localhost:20060 hg clone --pull --config http_proxy.always=True http://localhost:20059/ c
    21 
    31 
    22 echo %% proxy url with user name and password
    32 echo %% proxy url with user name and password
    23 http_proxy=http://user:passwd@localhost:20060 hg clone --config http_proxy.always=True http://localhost:20059/ d
    33 http_proxy=http://user:passwd@localhost:20060 hg clone --pull --config http_proxy.always=True http://localhost:20059/ d
    24 
    34 
    25 echo %% url with user name and password
    35 echo %% url with user name and password
    26 http_proxy=http://user:passwd@localhost:20060 hg clone --config http_proxy.always=True http://user:passwd@localhost:20059/ e
    36 http_proxy=http://user:passwd@localhost:20060 hg clone --pull --config http_proxy.always=True http://user:passwd@localhost:20059/ e
    27 
    37 
    28 echo %% bad host:port for proxy
    38 echo %% bad host:port for proxy
    29 http_proxy=localhost:20061 hg clone --config http_proxy.always=True http://localhost:20059/ f
    39 http_proxy=localhost:20061 hg clone --config http_proxy.always=True http://localhost:20059/ f
    30 
    40 
    31 exit 0
    41 exit 0