test-hgweb-commands
58 lines
| 2.4 KiB
| text/plain
|
TextLexer
/ tests / test-hgweb-commands
Dirkjan Ochtman
|
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 | ||||
Martin Geisler
|
r8167 | hg ci -Ambase | ||
Dirkjan Ochtman
|
r5590 | 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\//" | ||||
Gilles Moris
|
r7544 | "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/shortlog/' | ||
"$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/rev/0/' | ||||
Dirkjan Ochtman
|
r5590 | "$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' | ||||
Gilles Moris
|
r7544 | "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/file/1/foo' | ||
Dirkjan Ochtman
|
r5590 | "$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\//" | ||||
Gilles Moris
|
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' | ||||
Dirkjan Ochtman
|
r5590 | |||
Bryan O'Sullivan
|
r5593 | echo % capabilities | ||
Dirkjan Ochtman
|
r6777 | "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '?cmd=capabilities' | ||
Bryan O'Sullivan
|
r5593 | echo % heads | ||
Dirkjan Ochtman
|
r6777 | "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '?cmd=heads' | ||
Bryan O'Sullivan
|
r5593 | echo % lookup | ||
Dirkjan Ochtman
|
r6777 | "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '?cmd=lookup&node=1' | ||
Bryan O'Sullivan
|
r5593 | echo % branches | ||
Dirkjan Ochtman
|
r6777 | "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '?cmd=branches' | ||
Bryan O'Sullivan
|
r5593 | echo % changegroup | ||
Dirkjan Ochtman
|
r6777 | "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '?cmd=changegroup' | ||
Bryan O'Sullivan
|
r5593 | echo % stream_out | ||
Dirkjan Ochtman
|
r6777 | "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '?cmd=stream_out' | ||
Dirkjan Ochtman
|
r6335 | echo % failing unbundle, requires POST request | ||
Dirkjan Ochtman
|
r6777 | "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '?cmd=unbundle' | ||
Dirkjan Ochtman
|
r5590 | |||
echo % Static files | ||||
"$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/static/style.css' | ||||
echo % ERRORS ENCOUNTERED | ||||
cat errors.log | ||||