##// END OF EJS Templates
convert/git: check status when reading the whole output
convert/git: check status when reading the whole output

File last commit:

r10414:1a8df80d default
r10986:610f0473 stable
Show More
test-hgweb-commands
64 lines | 2.6 KiB | text/plain | TextLexer
/ tests / test-hgweb-commands
Dirkjan Ochtman
add more tests for 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
Martin Geisler
tests: removed redundant "-d '0 0'" from test scripts...
r8167 hg ci -Ambase
Dirkjan Ochtman
add more tests for hgweb commands
r5590 hg tag 1.0
Dirkjan Ochtman
tests: add test for branches webcommand
r8358 echo another > foo
hg branch stable
hg ci -Ambranch
Matt Mackall
streaming: actually change default
r10414 hg serve --config server.uncompressed=False -n test -p $HGPORT -d --pid-file=hg.pid -E errors.log
Dirkjan Ochtman
add more tests for hgweb commands
r5590 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
test-hgweb-*: replace "XX years ago" by a fixed string in get-with-headers.py...
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
add more tests for hgweb commands
r5590 "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/rev/1/?style=raw'
Dirkjan Ochtman
hgweb: add a test for search logs
r10248 "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/log?rev=base'
Dirkjan Ochtman
add more tests for hgweb commands
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'
Gilles Moris
test-hgweb-*: replace "XX years ago" by a fixed string in get-with-headers.py...
r7544 "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/file/1/foo'
Dirkjan Ochtman
add more tests for hgweb commands
r5590 "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/filediff/1/foo/?style=raw'
echo % Overviews
Dirkjan Ochtman
templates: add raw templates for tags/branches pages
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'
Gilles Moris
test-hgweb-*: replace "XX years ago" by a fixed string in get-with-headers.py...
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
add more tests for hgweb commands
r5590
Bryan O'Sullivan
Fix breaking test from 05451f6b5f07
r5593 echo % capabilities
Dirkjan Ochtman
hgweb: protocol requests are processed immediately...
r6777 "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '?cmd=capabilities'
Bryan O'Sullivan
Fix breaking test from 05451f6b5f07
r5593 echo % heads
Dirkjan Ochtman
hgweb: protocol requests are processed immediately...
r6777 "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '?cmd=heads'
Bryan O'Sullivan
Fix breaking test from 05451f6b5f07
r5593 echo % lookup
Dirkjan Ochtman
hgweb: protocol requests are processed immediately...
r6777 "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '?cmd=lookup&node=1'
Bryan O'Sullivan
Fix breaking test from 05451f6b5f07
r5593 echo % branches
Dirkjan Ochtman
hgweb: protocol requests are processed immediately...
r6777 "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '?cmd=branches'
Bryan O'Sullivan
Fix breaking test from 05451f6b5f07
r5593 echo % changegroup
Marti Raudsepp
tests: use repr.py to avoid binary characters in test output
r8446 "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '?cmd=changegroup' \
Martin Geisler
tests: renamed helper to avoid clash with stdlib repr module
r8448 | $TESTDIR/printrepr.py
Bryan O'Sullivan
Fix breaking test from 05451f6b5f07
r5593 echo % stream_out
Dirkjan Ochtman
hgweb: protocol requests are processed immediately...
r6777 "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '?cmd=stream_out'
Dirkjan Ochtman
hgweb: only accept POST requests for unbundle
r6335 echo % failing unbundle, requires POST request
Dirkjan Ochtman
hgweb: protocol requests are processed immediately...
r6777 "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '?cmd=unbundle'
Dirkjan Ochtman
add more tests for hgweb commands
r5590
echo % Static files
"$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/static/style.css'
echo % ERRORS ENCOUNTERED
cat errors.log