diff tests/test-wireproto-command-capabilities.t @ 37718:ad1c07008e0b

debugcommands: ability to suppress logging of handshake The tests for calling wire protocol commands were getting quite verbose because they included the results of the capabilities request. Furthermore, it was annoying to have to update several tests every time the capabilities response changed. The only tests that really care about the low-level details of the capabilities requests are those testing the protocol handshake. And those are mostly not instantiating peer instances or are contained to limited files. This commit adds an option to `hg debugwireproto` to suppress logging of the handshake. The shell helper function to perform HTTP tests has been updated to use this by default. Lots of excessive test output has gone away. Differential Revision: https://phab.mercurial-scm.org/D3378
author Gregory Szorc <gregory.szorc@gmail.com>
date Sat, 14 Apr 2018 11:49:57 -0700
parents 23c4ddda7bbe
children 89a16704114c
line wrap: on
line diff
--- a/tests/test-wireproto-command-capabilities.t	Sat Apr 14 09:57:44 2018 -0700
+++ b/tests/test-wireproto-command-capabilities.t	Sat Apr 14 11:49:57 2018 -0700
@@ -197,11 +197,11 @@
 
 capabilities command returns expected info
 
-  $ sendhttpv2peer << EOF
+  $ sendhttpv2peerhandshake << EOF
   > command capabilities
   > EOF
   creating http peer for wire protocol version 2
-  s>     *\r\n (glob)
+  s>     GET /?cmd=capabilities HTTP/1.1\r\n
   s>     Accept-Encoding: identity\r\n
   s>     vary: X-HgProto-1,X-HgUpgrade-1\r\n
   s>     x-hgproto-1: cbor\r\n