Mercurial > hg
comparison tests/test-http-api-httpv2.t @ 41402:4f0aca2b8c21
tests: add optional setsockopt() lines for Python 3
Differential Revision: https://phab.mercurial-scm.org/D5711
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Fri, 25 Jan 2019 17:11:49 -0800 |
parents | 090a797f2b47 |
children | 2f7408b7d247 |
comparison
equal
deleted
inserted
replaced
41401:4a33a6bf2b52 | 41402:4f0aca2b8c21 |
---|---|
16 $ sendhttpraw << EOF | 16 $ sendhttpraw << EOF |
17 > httprequest GET api/$HTTPV2 | 17 > httprequest GET api/$HTTPV2 |
18 > user-agent: test | 18 > user-agent: test |
19 > EOF | 19 > EOF |
20 using raw connection to peer | 20 using raw connection to peer |
21 s> setsockopt(6, 1, 1) -> None (py3 !) | |
21 s> GET /api/exp-http-v2-0003 HTTP/1.1\r\n | 22 s> GET /api/exp-http-v2-0003 HTTP/1.1\r\n |
22 s> Accept-Encoding: identity\r\n | 23 s> Accept-Encoding: identity\r\n |
23 s> user-agent: test\r\n | 24 s> user-agent: test\r\n |
24 s> host: $LOCALIP:$HGPORT\r\n (glob) | 25 s> host: $LOCALIP:$HGPORT\r\n (glob) |
25 s> \r\n | 26 s> \r\n |
44 $ sendhttpraw << EOF | 45 $ sendhttpraw << EOF |
45 > httprequest POST api/$HTTPV2/ro/badcommand | 46 > httprequest POST api/$HTTPV2/ro/badcommand |
46 > user-agent: test | 47 > user-agent: test |
47 > EOF | 48 > EOF |
48 using raw connection to peer | 49 using raw connection to peer |
50 s> setsockopt(6, 1, 1) -> None (py3 !) | |
49 s> POST /api/exp-http-v2-0003/ro/badcommand HTTP/1.1\r\n | 51 s> POST /api/exp-http-v2-0003/ro/badcommand HTTP/1.1\r\n |
50 s> Accept-Encoding: identity\r\n | 52 s> Accept-Encoding: identity\r\n |
51 s> user-agent: test\r\n | 53 s> user-agent: test\r\n |
52 s> host: $LOCALIP:$HGPORT\r\n (glob) | 54 s> host: $LOCALIP:$HGPORT\r\n (glob) |
53 s> \r\n | 55 s> \r\n |
65 $ sendhttpraw << EOF | 67 $ sendhttpraw << EOF |
66 > httprequest GET api/$HTTPV2/ro/customreadonly | 68 > httprequest GET api/$HTTPV2/ro/customreadonly |
67 > user-agent: test | 69 > user-agent: test |
68 > EOF | 70 > EOF |
69 using raw connection to peer | 71 using raw connection to peer |
72 s> setsockopt(6, 1, 1) -> None (py3 !) | |
70 s> GET /api/exp-http-v2-0003/ro/customreadonly HTTP/1.1\r\n | 73 s> GET /api/exp-http-v2-0003/ro/customreadonly HTTP/1.1\r\n |
71 s> Accept-Encoding: identity\r\n | 74 s> Accept-Encoding: identity\r\n |
72 s> user-agent: test\r\n | 75 s> user-agent: test\r\n |
73 s> host: $LOCALIP:$HGPORT\r\n (glob) | 76 s> host: $LOCALIP:$HGPORT\r\n (glob) |
74 s> \r\n | 77 s> \r\n |
86 $ sendhttpraw << EOF | 89 $ sendhttpraw << EOF |
87 > httprequest POST api/$HTTPV2/ro/customreadonly | 90 > httprequest POST api/$HTTPV2/ro/customreadonly |
88 > user-agent: test | 91 > user-agent: test |
89 > EOF | 92 > EOF |
90 using raw connection to peer | 93 using raw connection to peer |
94 s> setsockopt(6, 1, 1) -> None (py3 !) | |
91 s> POST /api/exp-http-v2-0003/ro/customreadonly HTTP/1.1\r\n | 95 s> POST /api/exp-http-v2-0003/ro/customreadonly HTTP/1.1\r\n |
92 s> Accept-Encoding: identity\r\n | 96 s> Accept-Encoding: identity\r\n |
93 s> user-agent: test\r\n | 97 s> user-agent: test\r\n |
94 s> host: $LOCALIP:$HGPORT\r\n (glob) | 98 s> host: $LOCALIP:$HGPORT\r\n (glob) |
95 s> \r\n | 99 s> \r\n |
108 > httprequest POST api/$HTTPV2/ro/customreadonly | 112 > httprequest POST api/$HTTPV2/ro/customreadonly |
109 > accept: invalid | 113 > accept: invalid |
110 > user-agent: test | 114 > user-agent: test |
111 > EOF | 115 > EOF |
112 using raw connection to peer | 116 using raw connection to peer |
117 s> setsockopt(6, 1, 1) -> None (py3 !) | |
113 s> POST /api/exp-http-v2-0003/ro/customreadonly HTTP/1.1\r\n | 118 s> POST /api/exp-http-v2-0003/ro/customreadonly HTTP/1.1\r\n |
114 s> Accept-Encoding: identity\r\n | 119 s> Accept-Encoding: identity\r\n |
115 s> accept: invalid\r\n | 120 s> accept: invalid\r\n |
116 s> user-agent: test\r\n | 121 s> user-agent: test\r\n |
117 s> host: $LOCALIP:$HGPORT\r\n (glob) | 122 s> host: $LOCALIP:$HGPORT\r\n (glob) |
132 > accept: $MEDIATYPE | 137 > accept: $MEDIATYPE |
133 > user-agent: test | 138 > user-agent: test |
134 > content-type: badmedia | 139 > content-type: badmedia |
135 > EOF | 140 > EOF |
136 using raw connection to peer | 141 using raw connection to peer |
142 s> setsockopt(6, 1, 1) -> None (py3 !) | |
137 s> POST /api/exp-http-v2-0003/ro/customreadonly HTTP/1.1\r\n | 143 s> POST /api/exp-http-v2-0003/ro/customreadonly HTTP/1.1\r\n |
138 s> Accept-Encoding: identity\r\n | 144 s> Accept-Encoding: identity\r\n |
139 s> accept: application/mercurial-exp-framing-0006\r\n | 145 s> accept: application/mercurial-exp-framing-0006\r\n |
140 s> content-type: badmedia\r\n | 146 s> content-type: badmedia\r\n |
141 s> user-agent: test\r\n | 147 s> user-agent: test\r\n |
158 > content-type: $MEDIATYPE | 164 > content-type: $MEDIATYPE |
159 > user-agent: test | 165 > user-agent: test |
160 > frame 1 1 stream-begin command-request new cbor:{b'name': b'customreadonly'} | 166 > frame 1 1 stream-begin command-request new cbor:{b'name': b'customreadonly'} |
161 > EOF | 167 > EOF |
162 using raw connection to peer | 168 using raw connection to peer |
169 s> setsockopt(6, 1, 1) -> None (py3 !) | |
163 s> POST /api/exp-http-v2-0003/ro/customreadonly HTTP/1.1\r\n | 170 s> POST /api/exp-http-v2-0003/ro/customreadonly HTTP/1.1\r\n |
164 s> Accept-Encoding: identity\r\n | 171 s> Accept-Encoding: identity\r\n |
165 s> *\r\n (glob) | 172 s> *\r\n (glob) |
166 s> content-type: application/mercurial-exp-framing-0006\r\n | 173 s> content-type: application/mercurial-exp-framing-0006\r\n |
167 s> user-agent: test\r\n | 174 s> user-agent: test\r\n |
194 $ sendhttpv2peerverbose << EOF | 201 $ sendhttpv2peerverbose << EOF |
195 > command customreadonly | 202 > command customreadonly |
196 > EOF | 203 > EOF |
197 creating http peer for wire protocol version 2 | 204 creating http peer for wire protocol version 2 |
198 sending customreadonly command | 205 sending customreadonly command |
206 s> setsockopt(6, 1, 1) -> None (py3 !) | |
199 s> POST /api/exp-http-v2-0003/ro/customreadonly HTTP/1.1\r\n | 207 s> POST /api/exp-http-v2-0003/ro/customreadonly HTTP/1.1\r\n |
200 s> Accept-Encoding: identity\r\n | 208 s> Accept-Encoding: identity\r\n |
201 s> accept: application/mercurial-exp-framing-0006\r\n | 209 s> accept: application/mercurial-exp-framing-0006\r\n |
202 s> content-type: application/mercurial-exp-framing-0006\r\n | 210 s> content-type: application/mercurial-exp-framing-0006\r\n |
203 s> content-length: 65\r\n | 211 s> content-length: 65\r\n |
241 $ sendhttpraw << EOF | 249 $ sendhttpraw << EOF |
242 > httprequest GET api/$HTTPV2/rw/customreadonly | 250 > httprequest GET api/$HTTPV2/rw/customreadonly |
243 > user-agent: test | 251 > user-agent: test |
244 > EOF | 252 > EOF |
245 using raw connection to peer | 253 using raw connection to peer |
254 s> setsockopt(6, 1, 1) -> None (py3 !) | |
246 s> GET /api/exp-http-v2-0003/rw/customreadonly HTTP/1.1\r\n | 255 s> GET /api/exp-http-v2-0003/rw/customreadonly HTTP/1.1\r\n |
247 s> Accept-Encoding: identity\r\n | 256 s> Accept-Encoding: identity\r\n |
248 s> user-agent: test\r\n | 257 s> user-agent: test\r\n |
249 s> host: $LOCALIP:$HGPORT\r\n (glob) | 258 s> host: $LOCALIP:$HGPORT\r\n (glob) |
250 s> \r\n | 259 s> \r\n |
262 $ sendhttpraw << EOF | 271 $ sendhttpraw << EOF |
263 > httprequest GET api/$HTTPV2/rw/badcommand | 272 > httprequest GET api/$HTTPV2/rw/badcommand |
264 > user-agent: test | 273 > user-agent: test |
265 > EOF | 274 > EOF |
266 using raw connection to peer | 275 using raw connection to peer |
276 s> setsockopt(6, 1, 1) -> None (py3 !) | |
267 s> GET /api/exp-http-v2-0003/rw/badcommand HTTP/1.1\r\n | 277 s> GET /api/exp-http-v2-0003/rw/badcommand HTTP/1.1\r\n |
268 s> Accept-Encoding: identity\r\n | 278 s> Accept-Encoding: identity\r\n |
269 s> user-agent: test\r\n | 279 s> user-agent: test\r\n |
270 s> host: $LOCALIP:$HGPORT\r\n (glob) | 280 s> host: $LOCALIP:$HGPORT\r\n (glob) |
271 s> \r\n | 281 s> \r\n |
283 $ sendhttpraw << EOF | 293 $ sendhttpraw << EOF |
284 > httprequest POST api/$HTTPV2/rw/customreadonly | 294 > httprequest POST api/$HTTPV2/rw/customreadonly |
285 > user-agent: test | 295 > user-agent: test |
286 > EOF | 296 > EOF |
287 using raw connection to peer | 297 using raw connection to peer |
298 s> setsockopt(6, 1, 1) -> None (py3 !) | |
288 s> POST /api/exp-http-v2-0003/rw/customreadonly HTTP/1.1\r\n | 299 s> POST /api/exp-http-v2-0003/rw/customreadonly HTTP/1.1\r\n |
289 s> Accept-Encoding: identity\r\n | 300 s> Accept-Encoding: identity\r\n |
290 s> user-agent: test\r\n | 301 s> user-agent: test\r\n |
291 s> host: $LOCALIP:$HGPORT\r\n (glob) | 302 s> host: $LOCALIP:$HGPORT\r\n (glob) |
292 s> \r\n | 303 s> \r\n |
321 > accept: $MEDIATYPE | 332 > accept: $MEDIATYPE |
322 > content-type: $MEDIATYPE | 333 > content-type: $MEDIATYPE |
323 > frame 1 1 stream-begin command-request new cbor:{b'name': b'customreadonly'} | 334 > frame 1 1 stream-begin command-request new cbor:{b'name': b'customreadonly'} |
324 > EOF | 335 > EOF |
325 using raw connection to peer | 336 using raw connection to peer |
337 s> setsockopt(6, 1, 1) -> None (py3 !) | |
326 s> POST /api/exp-http-v2-0003/rw/customreadonly HTTP/1.1\r\n | 338 s> POST /api/exp-http-v2-0003/rw/customreadonly HTTP/1.1\r\n |
327 s> Accept-Encoding: identity\r\n | 339 s> Accept-Encoding: identity\r\n |
328 s> accept: application/mercurial-exp-framing-0006\r\n | 340 s> accept: application/mercurial-exp-framing-0006\r\n |
329 s> content-type: application/mercurial-exp-framing-0006\r\n | 341 s> content-type: application/mercurial-exp-framing-0006\r\n |
330 s> user-agent: test\r\n | 342 s> user-agent: test\r\n |
360 > httprequest POST api/$HTTPV2/rw/badcommand | 372 > httprequest POST api/$HTTPV2/rw/badcommand |
361 > user-agent: test | 373 > user-agent: test |
362 > accept: $MEDIATYPE | 374 > accept: $MEDIATYPE |
363 > EOF | 375 > EOF |
364 using raw connection to peer | 376 using raw connection to peer |
377 s> setsockopt(6, 1, 1) -> None (py3 !) | |
365 s> POST /api/exp-http-v2-0003/rw/badcommand HTTP/1.1\r\n | 378 s> POST /api/exp-http-v2-0003/rw/badcommand HTTP/1.1\r\n |
366 s> Accept-Encoding: identity\r\n | 379 s> Accept-Encoding: identity\r\n |
367 s> accept: application/mercurial-exp-framing-0006\r\n | 380 s> accept: application/mercurial-exp-framing-0006\r\n |
368 s> user-agent: test\r\n | 381 s> user-agent: test\r\n |
369 s> host: $LOCALIP:$HGPORT\r\n (glob) | 382 s> host: $LOCALIP:$HGPORT\r\n (glob) |
382 $ sendhttpraw << EOF | 395 $ sendhttpraw << EOF |
383 > httprequest POST api/$HTTPV2/ro/debugreflect | 396 > httprequest POST api/$HTTPV2/ro/debugreflect |
384 > user-agent: test | 397 > user-agent: test |
385 > EOF | 398 > EOF |
386 using raw connection to peer | 399 using raw connection to peer |
400 s> setsockopt(6, 1, 1) -> None (py3 !) | |
387 s> POST /api/exp-http-v2-0003/ro/debugreflect HTTP/1.1\r\n | 401 s> POST /api/exp-http-v2-0003/ro/debugreflect HTTP/1.1\r\n |
388 s> Accept-Encoding: identity\r\n | 402 s> Accept-Encoding: identity\r\n |
389 s> user-agent: test\r\n | 403 s> user-agent: test\r\n |
390 s> host: $LOCALIP:$HGPORT\r\n (glob) | 404 s> host: $LOCALIP:$HGPORT\r\n (glob) |
391 s> \r\n | 405 s> \r\n |
422 > content-type: $MEDIATYPE | 436 > content-type: $MEDIATYPE |
423 > user-agent: test | 437 > user-agent: test |
424 > frame 1 1 stream-begin command-request new cbor:{b'name': b'command1', b'args': {b'foo': b'val1', b'bar1': b'val'}} | 438 > frame 1 1 stream-begin command-request new cbor:{b'name': b'command1', b'args': {b'foo': b'val1', b'bar1': b'val'}} |
425 > EOF | 439 > EOF |
426 using raw connection to peer | 440 using raw connection to peer |
441 s> setsockopt(6, 1, 1) -> None (py3 !) | |
427 s> POST /api/exp-http-v2-0003/ro/debugreflect HTTP/1.1\r\n | 442 s> POST /api/exp-http-v2-0003/ro/debugreflect HTTP/1.1\r\n |
428 s> Accept-Encoding: identity\r\n | 443 s> Accept-Encoding: identity\r\n |
429 s> accept: application/mercurial-exp-framing-0006\r\n | 444 s> accept: application/mercurial-exp-framing-0006\r\n |
430 s> content-type: application/mercurial-exp-framing-0006\r\n | 445 s> content-type: application/mercurial-exp-framing-0006\r\n |
431 s> user-agent: test\r\n | 446 s> user-agent: test\r\n |
453 > content-type: $MEDIATYPE | 468 > content-type: $MEDIATYPE |
454 > user-agent: test | 469 > user-agent: test |
455 > frame 1 1 stream-begin command-request new cbor:{b'name': b'customreadonly'} | 470 > frame 1 1 stream-begin command-request new cbor:{b'name': b'customreadonly'} |
456 > EOF | 471 > EOF |
457 using raw connection to peer | 472 using raw connection to peer |
473 s> setsockopt(6, 1, 1) -> None (py3 !) | |
458 s> POST /api/exp-http-v2-0003/ro/customreadonly HTTP/1.1\r\n | 474 s> POST /api/exp-http-v2-0003/ro/customreadonly HTTP/1.1\r\n |
459 s> Accept-Encoding: identity\r\n | 475 s> Accept-Encoding: identity\r\n |
460 s> accept: application/mercurial-exp-framing-0006\r\n | 476 s> accept: application/mercurial-exp-framing-0006\r\n |
461 s> content-type: application/mercurial-exp-framing-0006\r\n | 477 s> content-type: application/mercurial-exp-framing-0006\r\n |
462 s> user-agent: test\r\n | 478 s> user-agent: test\r\n |
495 > user-agent: test | 511 > user-agent: test |
496 > frame 1 1 stream-begin command-request new cbor:{b'name': b'customreadonly'} | 512 > frame 1 1 stream-begin command-request new cbor:{b'name': b'customreadonly'} |
497 > frame 3 1 0 command-request new cbor:{b'name': b'customreadonly'} | 513 > frame 3 1 0 command-request new cbor:{b'name': b'customreadonly'} |
498 > EOF | 514 > EOF |
499 using raw connection to peer | 515 using raw connection to peer |
516 s> setsockopt(6, 1, 1) -> None (py3 !) | |
500 s> POST /api/exp-http-v2-0003/ro/multirequest HTTP/1.1\r\n | 517 s> POST /api/exp-http-v2-0003/ro/multirequest HTTP/1.1\r\n |
501 s> Accept-Encoding: identity\r\n | 518 s> Accept-Encoding: identity\r\n |
502 s> *\r\n (glob) | 519 s> *\r\n (glob) |
503 s> *\r\n (glob) | 520 s> *\r\n (glob) |
504 s> user-agent: test\r\n | 521 s> user-agent: test\r\n |
548 > frame 3 1 0 command-request new|more \xa2Dargs\xa1Inamespace | 565 > frame 3 1 0 command-request new|more \xa2Dargs\xa1Inamespace |
549 > frame 3 1 0 command-request continuation JnamespacesDnameHlistkeys | 566 > frame 3 1 0 command-request continuation JnamespacesDnameHlistkeys |
550 > frame 1 1 0 command-request continuation IbookmarksDnameHlistkeys | 567 > frame 1 1 0 command-request continuation IbookmarksDnameHlistkeys |
551 > EOF | 568 > EOF |
552 using raw connection to peer | 569 using raw connection to peer |
570 s> setsockopt(6, 1, 1) -> None (py3 !) | |
553 s> POST /api/exp-http-v2-0003/ro/multirequest HTTP/1.1\r\n | 571 s> POST /api/exp-http-v2-0003/ro/multirequest HTTP/1.1\r\n |
554 s> Accept-Encoding: identity\r\n | 572 s> Accept-Encoding: identity\r\n |
555 s> accept: application/mercurial-exp-framing-0006\r\n | 573 s> accept: application/mercurial-exp-framing-0006\r\n |
556 s> content-type: application/mercurial-exp-framing-0006\r\n | 574 s> content-type: application/mercurial-exp-framing-0006\r\n |
557 s> user-agent: test\r\n | 575 s> user-agent: test\r\n |
613 > content-type: $MEDIATYPE | 631 > content-type: $MEDIATYPE |
614 > user-agent: test | 632 > user-agent: test |
615 > frame 1 1 stream-begin command-request new cbor:{b'name': b'pushkey'} | 633 > frame 1 1 stream-begin command-request new cbor:{b'name': b'pushkey'} |
616 > EOF | 634 > EOF |
617 using raw connection to peer | 635 using raw connection to peer |
636 s> setsockopt(6, 1, 1) -> None (py3 !) | |
618 s> POST /api/exp-http-v2-0003/ro/multirequest HTTP/1.1\r\n | 637 s> POST /api/exp-http-v2-0003/ro/multirequest HTTP/1.1\r\n |
619 s> Accept-Encoding: identity\r\n | 638 s> Accept-Encoding: identity\r\n |
620 s> accept: application/mercurial-exp-framing-0006\r\n | 639 s> accept: application/mercurial-exp-framing-0006\r\n |
621 s> content-type: application/mercurial-exp-framing-0006\r\n | 640 s> content-type: application/mercurial-exp-framing-0006\r\n |
622 s> user-agent: test\r\n | 641 s> user-agent: test\r\n |
639 > command heads | 658 > command heads |
640 > EOF | 659 > EOF |
641 creating http peer for wire protocol version 2 | 660 creating http peer for wire protocol version 2 |
642 sending heads command | 661 sending heads command |
643 wire protocol version 2 encoder referenced in config (badencoder) is not known; ignoring | 662 wire protocol version 2 encoder referenced in config (badencoder) is not known; ignoring |
663 s> setsockopt(6, 1, 1) -> None (py3 !) | |
644 s> POST /api/exp-http-v2-0003/ro/heads HTTP/1.1\r\n | 664 s> POST /api/exp-http-v2-0003/ro/heads HTTP/1.1\r\n |
645 s> Accept-Encoding: identity\r\n | 665 s> Accept-Encoding: identity\r\n |
646 s> accept: application/mercurial-exp-framing-0006\r\n | 666 s> accept: application/mercurial-exp-framing-0006\r\n |
647 s> content-type: application/mercurial-exp-framing-0006\r\n | 667 s> content-type: application/mercurial-exp-framing-0006\r\n |
648 s> content-length: 56\r\n | 668 s> content-length: 56\r\n |
684 $ hg --verbose debugwireproto --nologhandshake --peer http2 http://$LOCALIP:$HGPORT/ << EOF | 704 $ hg --verbose debugwireproto --nologhandshake --peer http2 http://$LOCALIP:$HGPORT/ << EOF |
685 > command heads | 705 > command heads |
686 > EOF | 706 > EOF |
687 creating http peer for wire protocol version 2 | 707 creating http peer for wire protocol version 2 |
688 sending heads command | 708 sending heads command |
709 s> setsockopt(6, 1, 1) -> None (py3 !) | |
689 s> POST /api/exp-http-v2-0003/ro/heads HTTP/1.1\r\n | 710 s> POST /api/exp-http-v2-0003/ro/heads HTTP/1.1\r\n |
690 s> Accept-Encoding: identity\r\n | 711 s> Accept-Encoding: identity\r\n |
691 s> accept: application/mercurial-exp-framing-0006\r\n | 712 s> accept: application/mercurial-exp-framing-0006\r\n |
692 s> content-type: application/mercurial-exp-framing-0006\r\n | 713 s> content-type: application/mercurial-exp-framing-0006\r\n |
693 s> content-length: 70\r\n | 714 s> content-length: 70\r\n |