tests/test-bad-pull.t
branchstable
changeset 16296 4343d5226149
parent 15515 21766d5531cb
child 16334 b9bd95e61b49
equal deleted inserted replaced
16294:795d591b6ef5 16296:4343d5226149
    11   > import BaseHTTPServer, SimpleHTTPServer, os, signal
    11   > import BaseHTTPServer, SimpleHTTPServer, os, signal
    12   > def run(server_class=BaseHTTPServer.HTTPServer,
    12   > def run(server_class=BaseHTTPServer.HTTPServer,
    13   >         handler_class=SimpleHTTPServer.SimpleHTTPRequestHandler):
    13   >         handler_class=SimpleHTTPServer.SimpleHTTPRequestHandler):
    14   >     server_address = ('localhost', int(os.environ['HGPORT']))
    14   >     server_address = ('localhost', int(os.environ['HGPORT']))
    15   >     httpd = server_class(server_address, handler_class)
    15   >     httpd = server_class(server_address, handler_class)
    16   >     httpd.serve_forever()
    16   >     os.system("hg clone http://localhost:$HGPORT/foo copy2&")
    17   > signal.signal(signal.SIGTERM, lambda x: sys.exit(0))
    17   >     httpd.handle_request()
    18   > run()
    18   > run()
    19   > EOF
    19   > EOF
    20 
    20 
    21   $ python dumb.py 2>/dev/null &
    21   $ python dumb.py
    22   $ echo $! >> $DAEMON_PIDS
    22   localhost - - [*] code 404, message File not found (glob)
    23 
    23   localhost - - [*] "GET /foo?cmd=capabilities HTTP/1.1" 404 - (glob)
    24 give the server some time to start running
       
    25 
       
    26   $ sleep 1
       
    27 
       
    28   $ hg clone http://localhost:$HGPORT/foo copy2 2>&1
       
    29   abort: HTTP Error 404: * (glob)
    24   abort: HTTP Error 404: * (glob)
    30   [255]
       
    31 
       
    32   $ kill $!