Mercurial > hg
comparison tests/test-http.t @ 45839:ebee234d952a
errors: set detailed exit code to 100 for some remote errors
This is per https://www.mercurial-scm.org/wiki/ErrorCategoriesPlan.
Differential Revision: https://phab.mercurial-scm.org/D9309
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Thu, 22 Oct 2020 13:31:34 -0700 |
parents | ff48eea4a926 |
children | 7015b0232c5e |
comparison
equal
deleted
inserted
replaced
45838:ae00e170f2d1 | 45839:ebee234d952a |
---|---|
165 | 165 |
166 clone from invalid URL | 166 clone from invalid URL |
167 | 167 |
168 $ hg clone http://localhost:$HGPORT/bad | 168 $ hg clone http://localhost:$HGPORT/bad |
169 abort: HTTP Error 404: Not Found | 169 abort: HTTP Error 404: Not Found |
170 [255] | 170 [100] |
171 | 171 |
172 test http authentication | 172 test http authentication |
173 + use the same server to test server side streaming preference | 173 + use the same server to test server side streaming preference |
174 | 174 |
175 $ cd test | 175 $ cd test |
281 $ hg id http://user2@localhost:$HGPORT2/ | 281 $ hg id http://user2@localhost:$HGPORT2/ |
282 abort: http authorization required for http://localhost:$HGPORT2/ | 282 abort: http authorization required for http://localhost:$HGPORT2/ |
283 [255] | 283 [255] |
284 $ hg id http://user:pass2@localhost:$HGPORT2/ | 284 $ hg id http://user:pass2@localhost:$HGPORT2/ |
285 abort: HTTP Error 403: no | 285 abort: HTTP Error 403: no |
286 [255] | 286 [100] |
287 | 287 |
288 $ hg -R dest-pull tag -r tip top | 288 $ hg -R dest-pull tag -r tip top |
289 $ hg -R dest-pull push http://user:pass@localhost:$HGPORT2/ | 289 $ hg -R dest-pull push http://user:pass@localhost:$HGPORT2/ |
290 pushing to http://user:***@localhost:$HGPORT2/ | 290 pushing to http://user:***@localhost:$HGPORT2/ |
291 searching for changes | 291 searching for changes |
473 added 3 changesets with 7 changes to 7 files | 473 added 3 changesets with 7 changes to 7 files |
474 new changesets 8b6053c928fe:56f9bc90cce6 | 474 new changesets 8b6053c928fe:56f9bc90cce6 |
475 updating to branch default | 475 updating to branch default |
476 cloning subrepo sub from http://localhost:$HGPORT/sub | 476 cloning subrepo sub from http://localhost:$HGPORT/sub |
477 abort: HTTP Error 404: Not Found | 477 abort: HTTP Error 404: Not Found |
478 [255] | 478 [100] |
479 $ hg clone http://localhost:$HGPORT/ slash-clone | 479 $ hg clone http://localhost:$HGPORT/ slash-clone |
480 requesting all changes | 480 requesting all changes |
481 adding changesets | 481 adding changesets |
482 adding manifests | 482 adding manifests |
483 adding file changes | 483 adding file changes |
484 added 3 changesets with 7 changes to 7 files | 484 added 3 changesets with 7 changes to 7 files |
485 new changesets 8b6053c928fe:56f9bc90cce6 | 485 new changesets 8b6053c928fe:56f9bc90cce6 |
486 updating to branch default | 486 updating to branch default |
487 cloning subrepo sub from http://localhost:$HGPORT/sub | 487 cloning subrepo sub from http://localhost:$HGPORT/sub |
488 abort: HTTP Error 404: Not Found | 488 abort: HTTP Error 404: Not Found |
489 [255] | 489 [100] |
490 | 490 |
491 check error log | 491 check error log |
492 | 492 |
493 $ cat error.log | 493 $ cat error.log |
494 | 494 |
586 | 586 |
587 Request without cookie sent should fail due to lack of cookie | 587 Request without cookie sent should fail due to lack of cookie |
588 | 588 |
589 $ hg id http://localhost:$HGPORT | 589 $ hg id http://localhost:$HGPORT |
590 abort: HTTP Error 500: no-cookie | 590 abort: HTTP Error 500: no-cookie |
591 [255] | 591 [100] |
592 | 592 |
593 Populate a cookies file | 593 Populate a cookies file |
594 | 594 |
595 $ cat > cookies.txt << EOF | 595 $ cat > cookies.txt << EOF |
596 > # HTTP Cookie File | 596 > # HTTP Cookie File |
600 | 600 |
601 Should not send a cookie for another domain | 601 Should not send a cookie for another domain |
602 | 602 |
603 $ hg --config auth.cookiefile=cookies.txt id http://localhost:$HGPORT/ | 603 $ hg --config auth.cookiefile=cookies.txt id http://localhost:$HGPORT/ |
604 abort: HTTP Error 500: no-cookie | 604 abort: HTTP Error 500: no-cookie |
605 [255] | 605 [100] |
606 | 606 |
607 Add a cookie entry for our test server and verify it is sent | 607 Add a cookie entry for our test server and verify it is sent |
608 | 608 |
609 $ cat >> cookies.txt << EOF | 609 $ cat >> cookies.txt << EOF |
610 > localhost.local FALSE / FALSE 1893456000 hgkey localhostvalue | 610 > localhost.local FALSE / FALSE 1893456000 hgkey localhostvalue |
611 > EOF | 611 > EOF |
612 | 612 |
613 $ hg --config auth.cookiefile=cookies.txt id http://localhost:$HGPORT/ | 613 $ hg --config auth.cookiefile=cookies.txt id http://localhost:$HGPORT/ |
614 abort: HTTP Error 500: Cookie: hgkey=localhostvalue | 614 abort: HTTP Error 500: Cookie: hgkey=localhostvalue |
615 [255] | 615 [100] |