tests/test-http-proxy
changeset 2613 479e26afa10f
parent 2612 ffb895f16925
child 2621 5a5852a417b1
equal deleted inserted replaced
2612:ffb895f16925 2613:479e26afa10f
    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, stream
    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 --stream http://localhost:20059/ b | \
    18   sed -e 's/[0-9][0-9.]*/XXX/g'
    18   sed -e 's/[0-9][0-9.]*/XXX/g'
    19 cd b
    19 cd b
    20 hg verify
    20 hg verify
    21 cd ..
    21 cd ..
    22 
    22 
    23 echo %% url for proxy, pull
    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
    24 http_proxy=http://localhost:20060/ hg --config http_proxy.always=True clone http://localhost:20059/ b-pull
    25 cd b-pull
    25 cd b-pull
    26 hg verify
    26 hg verify
    27 cd ..
    27 cd ..
    28 
    28 
    29 echo %% host:port for proxy
    29 echo %% host:port for proxy
    30 http_proxy=localhost:20060 hg clone --pull --config http_proxy.always=True http://localhost:20059/ c
    30 http_proxy=localhost:20060 hg clone --config http_proxy.always=True http://localhost:20059/ c
    31 
    31 
    32 echo %% proxy url with user name and password
    32 echo %% proxy url with user name and password
    33 http_proxy=http://user:passwd@localhost:20060 hg clone --pull --config http_proxy.always=True http://localhost:20059/ d
    33 http_proxy=http://user:passwd@localhost:20060 hg clone --config http_proxy.always=True http://localhost:20059/ d
    34 
    34 
    35 echo %% url with user name and password
    35 echo %% url with user name and password
    36 http_proxy=http://user:passwd@localhost:20060 hg clone --pull --config http_proxy.always=True http://user:passwd@localhost:20059/ e
    36 http_proxy=http://user:passwd@localhost:20060 hg clone --config http_proxy.always=True http://user:passwd@localhost:20059/ e
    37 
    37 
    38 echo %% bad host:port for proxy
    38 echo %% bad host:port for proxy
    39 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
    40 
    40 
    41 exit 0
    41 exit 0