test-hgweb-commands
64 lines
| 2.5 KiB
| text/plain
|
TextLexer
/ tests / test-hgweb-commands
|
r5590 | #!/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 | ||||
|
r8167 | hg ci -Ambase | ||
|
r5590 | hg tag 1.0 | ||
|
r8358 | echo another > foo | ||
hg branch stable | ||||
hg ci -Ambranch | ||||
|
r5590 | 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\//" | ||||
|
r7544 | "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/shortlog/' | ||
"$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/rev/0/' | ||||
|
r5590 | "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/rev/1/?style=raw' | ||
|
r10248 | "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/log?rev=base' | ||
|
r5590 | |||
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' | ||||
|
r7544 | "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/file/1/foo' | ||
|
r5590 | "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/filediff/1/foo/?style=raw' | ||
echo % Overviews | ||||
|
r9946 | "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/raw-tags' | ||
"$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/raw-branches' | ||||
|
r7544 | "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/summary/?style=gitweb' | ||
"$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/graph/?style=gitweb' | ||||
|
r5590 | |||
|
r5593 | echo % capabilities | ||
|
r6777 | "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '?cmd=capabilities' | ||
|
r5593 | echo % heads | ||
|
r6777 | "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '?cmd=heads' | ||
|
r5593 | echo % lookup | ||
|
r6777 | "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '?cmd=lookup&node=1' | ||
|
r5593 | echo % branches | ||
|
r6777 | "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '?cmd=branches' | ||
|
r5593 | echo % changegroup | ||
|
r8446 | "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '?cmd=changegroup' \ | ||
|
r8448 | | $TESTDIR/printrepr.py | ||
|
r5593 | echo % stream_out | ||
|
r6777 | "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '?cmd=stream_out' | ||
|
r6335 | echo % failing unbundle, requires POST request | ||
|
r6777 | "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '?cmd=unbundle' | ||
|
r5590 | |||
echo % Static files | ||||
"$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/static/style.css' | ||||
echo % ERRORS ENCOUNTERED | ||||
cat errors.log | ||||