Mercurial > hg
comparison tests/test-wireproto-command-capabilities.t @ 41379:4d86bdef3371
tests: add optional setsockopt() output on Python 3
Tests still don't pass. But this gets us a little closer.
Differential Revision: https://phab.mercurial-scm.org/D5699
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Fri, 25 Jan 2019 15:09:08 -0800 |
parents | a0886a4d6dce |
children | 090a797f2b47 |
comparison
equal
deleted
inserted
replaced
41378:e6c1c6478d04 | 41379:4d86bdef3371 |
---|---|
20 $ sendhttpraw << EOF | 20 $ sendhttpraw << EOF |
21 > httprequest GET ?cmd=capabilities | 21 > httprequest GET ?cmd=capabilities |
22 > user-agent: test | 22 > user-agent: test |
23 > EOF | 23 > EOF |
24 using raw connection to peer | 24 using raw connection to peer |
25 s> setsockopt(6, 1, 1) -> None (py3 !) | |
25 s> GET /?cmd=capabilities HTTP/1.1\r\n | 26 s> GET /?cmd=capabilities HTTP/1.1\r\n |
26 s> Accept-Encoding: identity\r\n | 27 s> Accept-Encoding: identity\r\n |
27 s> user-agent: test\r\n | 28 s> user-agent: test\r\n |
28 s> host: $LOCALIP:$HGPORT\r\n (glob) | 29 s> host: $LOCALIP:$HGPORT\r\n (glob) |
29 s> \r\n | 30 s> \r\n |
43 > user-agent: test | 44 > user-agent: test |
44 > x-hgupgrade-1: foo | 45 > x-hgupgrade-1: foo |
45 > x-hgproto-1: cbor | 46 > x-hgproto-1: cbor |
46 > EOF | 47 > EOF |
47 using raw connection to peer | 48 using raw connection to peer |
49 s> setsockopt(6, 1, 1) -> None (py3 !) | |
48 s> GET /?cmd=capabilities HTTP/1.1\r\n | 50 s> GET /?cmd=capabilities HTTP/1.1\r\n |
49 s> Accept-Encoding: identity\r\n | 51 s> Accept-Encoding: identity\r\n |
50 s> user-agent: test\r\n | 52 s> user-agent: test\r\n |
51 s> x-hgproto-1: cbor\r\n | 53 s> x-hgproto-1: cbor\r\n |
52 s> x-hgupgrade-1: foo\r\n | 54 s> x-hgupgrade-1: foo\r\n |
80 > httprequest GET ?cmd=capabilities | 82 > httprequest GET ?cmd=capabilities |
81 > user-agent: test | 83 > user-agent: test |
82 > x-hgupgrade-1: foo bar | 84 > x-hgupgrade-1: foo bar |
83 > EOF | 85 > EOF |
84 using raw connection to peer | 86 using raw connection to peer |
87 s> setsockopt(6, 1, 1) -> None (py3 !) | |
85 s> GET /?cmd=capabilities HTTP/1.1\r\n | 88 s> GET /?cmd=capabilities HTTP/1.1\r\n |
86 s> Accept-Encoding: identity\r\n | 89 s> Accept-Encoding: identity\r\n |
87 s> user-agent: test\r\n | 90 s> user-agent: test\r\n |
88 s> x-hgupgrade-1: foo bar\r\n | 91 s> x-hgupgrade-1: foo bar\r\n |
89 s> host: $LOCALIP:$HGPORT\r\n (glob) | 92 s> host: $LOCALIP:$HGPORT\r\n (glob) |
104 > user-agent: test | 107 > user-agent: test |
105 > x-hgupgrade-1: foo bar | 108 > x-hgupgrade-1: foo bar |
106 > x-hgproto-1: some value | 109 > x-hgproto-1: some value |
107 > EOF | 110 > EOF |
108 using raw connection to peer | 111 using raw connection to peer |
112 s> setsockopt(6, 1, 1) -> None (py3 !) | |
109 s> GET /?cmd=capabilities HTTP/1.1\r\n | 113 s> GET /?cmd=capabilities HTTP/1.1\r\n |
110 s> Accept-Encoding: identity\r\n | 114 s> Accept-Encoding: identity\r\n |
111 s> user-agent: test\r\n | 115 s> user-agent: test\r\n |
112 s> x-hgproto-1: some value\r\n | 116 s> x-hgproto-1: some value\r\n |
113 s> x-hgupgrade-1: foo bar\r\n | 117 s> x-hgupgrade-1: foo bar\r\n |
129 > user-agent: test | 133 > user-agent: test |
130 > x-hgupgrade-1: foo bar | 134 > x-hgupgrade-1: foo bar |
131 > x-hgproto-1: cbor | 135 > x-hgproto-1: cbor |
132 > EOF | 136 > EOF |
133 using raw connection to peer | 137 using raw connection to peer |
138 s> setsockopt(6, 1, 1) -> None (py3 !) | |
134 s> GET /?cmd=capabilities HTTP/1.1\r\n | 139 s> GET /?cmd=capabilities HTTP/1.1\r\n |
135 s> Accept-Encoding: identity\r\n | 140 s> Accept-Encoding: identity\r\n |
136 s> user-agent: test\r\n | 141 s> user-agent: test\r\n |
137 s> x-hgproto-1: cbor\r\n | 142 s> x-hgproto-1: cbor\r\n |
138 s> x-hgupgrade-1: foo bar\r\n | 143 s> x-hgupgrade-1: foo bar\r\n |
168 > user-agent: test | 173 > user-agent: test |
169 > x-hgupgrade-1: foo bar | 174 > x-hgupgrade-1: foo bar |
170 > x-hgproto-1: cbor | 175 > x-hgproto-1: cbor |
171 > EOF | 176 > EOF |
172 using raw connection to peer | 177 using raw connection to peer |
178 s> setsockopt(6, 1, 1) -> None (py3 !) | |
173 s> GET /?cmd=capabilities HTTP/1.1\r\n | 179 s> GET /?cmd=capabilities HTTP/1.1\r\n |
174 s> Accept-Encoding: identity\r\n | 180 s> Accept-Encoding: identity\r\n |
175 s> user-agent: test\r\n | 181 s> user-agent: test\r\n |
176 s> x-hgproto-1: cbor\r\n | 182 s> x-hgproto-1: cbor\r\n |
177 s> x-hgupgrade-1: foo bar\r\n | 183 s> x-hgupgrade-1: foo bar\r\n |
200 > user-agent: test | 206 > user-agent: test |
201 > x-hgupgrade-1: exp-http-v2-0003 foo bar | 207 > x-hgupgrade-1: exp-http-v2-0003 foo bar |
202 > x-hgproto-1: cbor | 208 > x-hgproto-1: cbor |
203 > EOF | 209 > EOF |
204 using raw connection to peer | 210 using raw connection to peer |
211 s> setsockopt(6, 1, 1) -> None (py3 !) | |
205 s> GET /?cmd=capabilities HTTP/1.1\r\n | 212 s> GET /?cmd=capabilities HTTP/1.1\r\n |
206 s> Accept-Encoding: identity\r\n | 213 s> Accept-Encoding: identity\r\n |
207 s> user-agent: test\r\n | 214 s> user-agent: test\r\n |
208 s> x-hgproto-1: cbor\r\n | 215 s> x-hgproto-1: cbor\r\n |
209 s> x-hgupgrade-1: exp-http-v2-0003 foo bar\r\n | 216 s> x-hgupgrade-1: exp-http-v2-0003 foo bar\r\n |
458 | 465 |
459 $ sendhttpv2peerhandshake << EOF | 466 $ sendhttpv2peerhandshake << EOF |
460 > command capabilities | 467 > command capabilities |
461 > EOF | 468 > EOF |
462 creating http peer for wire protocol version 2 | 469 creating http peer for wire protocol version 2 |
470 s> setsockopt(6, 1, 1) -> None (py3 !) | |
463 s> GET /?cmd=capabilities HTTP/1.1\r\n | 471 s> GET /?cmd=capabilities HTTP/1.1\r\n |
464 s> Accept-Encoding: identity\r\n | 472 s> Accept-Encoding: identity\r\n |
465 s> vary: X-HgProto-1,X-HgUpgrade-1\r\n | 473 s> vary: X-HgProto-1,X-HgUpgrade-1\r\n |
466 s> x-hgproto-1: cbor\r\n | 474 s> x-hgproto-1: cbor\r\n |
467 s> x-hgupgrade-1: exp-http-v2-0003\r\n | 475 s> x-hgupgrade-1: exp-http-v2-0003\r\n |
476 s> Content-Type: application/mercurial-cbor\r\n | 484 s> Content-Type: application/mercurial-cbor\r\n |
477 s> Content-Length: *\r\n (glob) | 485 s> Content-Length: *\r\n (glob) |
478 s> \r\n | 486 s> \r\n |
479 s> \xa3GapibaseDapi/Dapis\xa1Pexp-http-v2-0003\xa4Hcommands\xacIbranchmap\xa2Dargs\xa0Kpermissions\x81DpullLcapabilities\xa2Dargs\xa0Kpermissions\x81DpullMchangesetdata\xa2Dargs\xa2Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x84IbookmarksGparentsEphaseHrevisionIrevisions\xa2Hrequired\xf5DtypeDlistKpermissions\x81DpullHfiledata\xa2Dargs\xa4Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x83HlinknodeGparentsHrevisionKhaveparents\xa3Gdefault\xf4Hrequired\xf4DtypeDboolEnodes\xa2Hrequired\xf5DtypeDlistDpath\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullIfilesdata\xa3Dargs\xa4Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x84NfirstchangesetHlinknodeGparentsHrevisionKhaveparents\xa3Gdefault\xf4Hrequired\xf4DtypeDboolJpathfilter\xa3Gdefault\xf6Hrequired\xf4DtypeDdictIrevisions\xa2Hrequired\xf5DtypeDlistKpermissions\x81DpullTrecommendedbatchsize\x19\xc3PEheads\xa2Dargs\xa1Jpubliconly\xa3Gdefault\xf4Hrequired\xf4DtypeDboolKpermissions\x81DpullEknown\xa2Dargs\xa1Enodes\xa3Gdefault\x80Hrequired\xf4DtypeDlistKpermissions\x81DpullHlistkeys\xa2Dargs\xa1Inamespace\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullFlookup\xa2Dargs\xa1Ckey\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullLmanifestdata\xa3Dargs\xa4Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x82GparentsHrevisionKhaveparents\xa3Gdefault\xf4Hrequired\xf4DtypeDboolEnodes\xa2Hrequired\xf5DtypeDlistDtree\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullTrecommendedbatchsize\x1a\x00\x01\x86\xa0Gpushkey\xa2Dargs\xa4Ckey\xa2Hrequired\xf5DtypeEbytesInamespace\xa2Hrequired\xf5DtypeEbytesCnew\xa2Hrequired\xf5DtypeEbytesCold\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpushPrawstorefiledata\xa2Dargs\xa2Efiles\xa2Hrequired\xf5DtypeDlistJpathfilter\xa3Gdefault\xf6Hrequired\xf4DtypeDlistKpermissions\x81DpullQframingmediatypes\x81X&application/mercurial-exp-framing-0006Rpathfilterprefixes\xd9\x01\x02\x82Epath:Lrootfilesin:Nrawrepoformats\x83LgeneraldeltaHrevlogv1LsparserevlogNv1capabilitiesY\x01\xe0batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset compression=$BUNDLE2_COMPRESSIONS$ getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash | 487 s> \xa3GapibaseDapi/Dapis\xa1Pexp-http-v2-0003\xa4Hcommands\xacIbranchmap\xa2Dargs\xa0Kpermissions\x81DpullLcapabilities\xa2Dargs\xa0Kpermissions\x81DpullMchangesetdata\xa2Dargs\xa2Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x84IbookmarksGparentsEphaseHrevisionIrevisions\xa2Hrequired\xf5DtypeDlistKpermissions\x81DpullHfiledata\xa2Dargs\xa4Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x83HlinknodeGparentsHrevisionKhaveparents\xa3Gdefault\xf4Hrequired\xf4DtypeDboolEnodes\xa2Hrequired\xf5DtypeDlistDpath\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullIfilesdata\xa3Dargs\xa4Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x84NfirstchangesetHlinknodeGparentsHrevisionKhaveparents\xa3Gdefault\xf4Hrequired\xf4DtypeDboolJpathfilter\xa3Gdefault\xf6Hrequired\xf4DtypeDdictIrevisions\xa2Hrequired\xf5DtypeDlistKpermissions\x81DpullTrecommendedbatchsize\x19\xc3PEheads\xa2Dargs\xa1Jpubliconly\xa3Gdefault\xf4Hrequired\xf4DtypeDboolKpermissions\x81DpullEknown\xa2Dargs\xa1Enodes\xa3Gdefault\x80Hrequired\xf4DtypeDlistKpermissions\x81DpullHlistkeys\xa2Dargs\xa1Inamespace\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullFlookup\xa2Dargs\xa1Ckey\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullLmanifestdata\xa3Dargs\xa4Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x82GparentsHrevisionKhaveparents\xa3Gdefault\xf4Hrequired\xf4DtypeDboolEnodes\xa2Hrequired\xf5DtypeDlistDtree\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullTrecommendedbatchsize\x1a\x00\x01\x86\xa0Gpushkey\xa2Dargs\xa4Ckey\xa2Hrequired\xf5DtypeEbytesInamespace\xa2Hrequired\xf5DtypeEbytesCnew\xa2Hrequired\xf5DtypeEbytesCold\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpushPrawstorefiledata\xa2Dargs\xa2Efiles\xa2Hrequired\xf5DtypeDlistJpathfilter\xa3Gdefault\xf6Hrequired\xf4DtypeDlistKpermissions\x81DpullQframingmediatypes\x81X&application/mercurial-exp-framing-0006Rpathfilterprefixes\xd9\x01\x02\x82Epath:Lrootfilesin:Nrawrepoformats\x83LgeneraldeltaHrevlogv1LsparserevlogNv1capabilitiesY\x01\xe0batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset compression=$BUNDLE2_COMPRESSIONS$ getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash |
480 sending capabilities command | 488 sending capabilities command |
489 s> setsockopt(6, 1, 1) -> None (py3 !) | |
481 s> POST /api/exp-http-v2-0003/ro/capabilities HTTP/1.1\r\n | 490 s> POST /api/exp-http-v2-0003/ro/capabilities HTTP/1.1\r\n |
482 s> Accept-Encoding: identity\r\n | 491 s> Accept-Encoding: identity\r\n |
483 s> accept: application/mercurial-exp-framing-0006\r\n | 492 s> accept: application/mercurial-exp-framing-0006\r\n |
484 s> content-type: application/mercurial-exp-framing-0006\r\n | 493 s> content-type: application/mercurial-exp-framing-0006\r\n |
485 s> content-length: 63\r\n | 494 s> content-length: 63\r\n |