sapling/tests/test-hgweb-commands

59 lines
2.6 KiB
Plaintext
Raw Normal View History

2007-12-03 01:26:40 +03:00
#!/bin/sh
# An attempt at more fully testing the hgweb web interface.
# The following things are tested elsewhere and are therefore omitted:
# - archive, tested in test-archive
# - unbundle, tested in test-push-http
# - changegroupsubset, tested in test-pull
echo % Set up the repo
hg init test
cd test
mkdir da
echo foo > da/foo
echo foo > foo
2007-12-03 08:52:40 +03:00
hg ci -d'0 0' -Ambase
2007-12-03 01:26:40 +03:00
hg tag 1.0
hg serve -n test -p $HGPORT -d --pid-file=hg.pid -E errors.log
cat hg.pid >> $DAEMON_PIDS
echo % Logs and changes
"$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/log/?style=atom' | sed "s/http:\/\/[^/]*\//http:\/\/127.0.0.1\//"
"$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/log/1/?style=atom' | sed "s/http:\/\/[^/]*\//http:\/\/127.0.0.1\//"
"$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/log/1/foo/?style=atom' | sed "s/http:\/\/[^/]*\//http:\/\/127.0.0.1\//"
"$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/shortlog/' | sed "s/[0-9]* years/many years/"
2008-02-23 13:19:59 +03:00
"$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/rev/0/' | sed "s/[0-9]* years ago/long ago/g"
2007-12-03 01:26:40 +03:00
"$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/rev/1/?style=raw'
echo % File-related
"$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/file/1/foo/?style=raw'
"$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/annotate/1/foo/?style=raw'
"$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/file/1/?style=raw'
"$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/file/1/foo' | sed "s/[0-9]* years/many years/"
2007-12-03 01:26:40 +03:00
"$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/filediff/1/foo/?style=raw'
echo % Overviews
"$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/tags/?style=atom' | sed "s/http:\/\/[^/]*\//http:\/\/127.0.0.1\//"
"$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/summary/?style=gitweb' | sed "s/[0-9]* years ago/long ago/g"
2008-06-30 00:47:57 +04:00
"$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/graph/?style=gitweb' | sed "s/[0-9]* years/long/g"
2007-12-03 01:26:40 +03:00
2007-12-03 08:52:40 +03:00
echo % capabilities
"$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '?cmd=capabilities'
2007-12-03 08:52:40 +03:00
echo % heads
"$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '?cmd=heads'
2007-12-03 08:52:40 +03:00
echo % lookup
"$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '?cmd=lookup&node=1'
2007-12-03 08:52:40 +03:00
echo % branches
"$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '?cmd=branches'
2007-12-03 08:52:40 +03:00
echo % changegroup
"$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '?cmd=changegroup'
2007-12-03 08:52:40 +03:00
echo % stream_out
"$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '?cmd=stream_out'
echo % failing unbundle, requires POST request
"$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '?cmd=unbundle'
2007-12-03 01:26:40 +03:00
echo % Static files
"$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/static/style.css'
echo % ERRORS ENCOUNTERED
cat errors.log