##// END OF EJS Templates
tests: pull common http server setup out of individual tests...
tests: pull common http server setup out of individual tests There are currently two different tests using roughly the same code to create temporary scripts acting as HTTP servers. As there is going to be at least one more in an upcoming change, factor those out in a standalone dumbhttp.py script.

File last commit:

r22959:10116463 default
r22959:10116463 default
Show More
test-bad-pull.t
21 lines | 461 B | text/troff | Tads3Lexer
#require serve killdaemons
#if windows
$ hg clone http://localhost:$HGPORT/ copy
abort: * (glob)
[255]
#else
$ hg clone http://localhost:$HGPORT/ copy
abort: error: Connection refused
[255]
#endif
$ test -d copy
[1]
$ python "$TESTDIR/dumbhttp.py" -p $HGPORT --pid dumb.pid
$ cat dumb.pid >> $DAEMON_PIDS
$ hg clone http://localhost:$HGPORT/foo copy2
abort: HTTP Error 404: * (glob)
[255]
$ "$TESTDIR/killdaemons.py" $DAEMON_PIDS