mirror of
https://github.com/facebook/sapling.git
synced 2024-10-11 17:27:53 +03:00
7dcde933f1
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.
22 lines
461 B
Perl
22 lines
461 B
Perl
#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
|