tests/test-wireproto-command-lookup.t
changeset 48526 04688c51f81f
parent 48525 d6c53b40b078
child 48527 bf5dc156bb4c
equal deleted inserted replaced
48525:d6c53b40b078 48526:04688c51f81f
     1   $ . $TESTDIR/wireprotohelpers.sh
       
     2 
       
     3   $ hg init server
       
     4   $ enablehttpv2 server
       
     5   $ cd server
       
     6   $ cat >> .hg/hgrc << EOF
       
     7   > [web]
       
     8   > push_ssl = false
       
     9   > allow-push = *
       
    10   > EOF
       
    11   $ hg debugdrawdag << EOF
       
    12   > C D
       
    13   > |/
       
    14   > B
       
    15   > |
       
    16   > A
       
    17   > EOF
       
    18   $ root_node=$(hg log -r A -T '{node}')
       
    19 
       
    20   $ hg serve -p $HGPORT -d --pid-file hg.pid -E error.log
       
    21   $ cat hg.pid > $DAEMON_PIDS
       
    22 
       
    23 lookup for known node works
       
    24 
       
    25   $ sendhttpv2peer << EOF
       
    26   > command lookup
       
    27   >     key $root_node
       
    28   > EOF
       
    29   creating http peer for wire protocol version 2
       
    30   sending lookup command
       
    31   response: b'Bk\xad\xa5\xc6u\x98\xcae\x03mW\xd9\xe4\xb6K\x0c\x1c\xe7\xa0'
       
    32 
       
    33   $ cat error.log