Mercurial > public > mercurial-scm > hg-stable
diff tests/test-http-protocol.t @ 37652:fe8c6f9f2914
debugcommands: use command executor for invoking commands
Now that all peers support the command executor interface, we
can use it in place of peer._call() (which isn't part of the public
API).
Tests changed because we are now returning the decoded response
instead of the raw bytes. The raw bytes over the wire are already
logged. So we're not losing any test coverage. In fact, we're adding
test coverage because we're testing decoding of those command
responses as well.
Differential Revision: https://phab.mercurial-scm.org/D3298
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Fri, 13 Apr 2018 12:31:34 -0700 |
parents | 72b0982cd509 |
children | b2fa1591fb44 |
line wrap: on
line diff
--- a/tests/test-http-protocol.t Fri Apr 13 12:30:04 2018 -0700 +++ b/tests/test-http-protocol.t Fri Apr 13 12:31:34 2018 -0700 @@ -211,7 +211,7 @@ s> bookmarks\t\n s> namespaces\t\n s> phases\t - response: b'bookmarks\t\nnamespaces\t\nphases\t' + response: {b'bookmarks': b'', b'namespaces': b'', b'phases': b''} Same thing, but with "httprequest" command @@ -277,7 +277,7 @@ s> Content-Length: 41\r\n s> \r\n s> 0000000000000000000000000000000000000000\n - response: b'0000000000000000000000000000000000000000\n' + response: [b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'] $ killdaemons.py $ enablehttpv2 empty