sapling/tests/test-bad-pull.t
Mike Hommey 7dcde933f1 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.
2014-10-16 13:48:51 +09:00

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