##// END OF EJS Templates
tests: remove unneeded -d flags...
tests: remove unneeded -d flags Many tests fixed the commit date of their changesets at '1000000 0' or similar. However testing with "Mon Jan 12 13:46:40 1970 +0000" is not better than testing with "Thu Jan 01 00:00:00 1970 +0000", which is the default run-tests.py installs. Removing the unnecessary flag removes some clutter and will hopefully make it clearer what the tests are really trying to test. Some tests did not even change their output when the dates were changed, in which case the -d flag was truly irrelevant. Dates used in sequence (such as '0 0', '1 0', etc...) were left alone since they may make the test easier to understand.

File last commit:

r9842:d3dbdca9 default
r12156:4c94b6d0 default
Show More
test-hgweb
49 lines | 1.6 KiB | text/plain | TextLexer
Brendan Cully
hgweb: simple tests
r3942 #!/bin/sh
Dirkjan Ochtman
Fix style nit and add some comments to tests.
r5580 # Some tests for hgweb. Tests static files, plain files and different 404's.
Brendan Cully
hgweb: simple tests
r3942
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
hgweb: don't choke when an inexistent style is requested (issue1901)
r9842
Matt Mackall
tests: fix test-hgweb to not leak directory name
r7341 hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
Bryan O'Sullivan
hgweb: return meaningful HTTP status codes instead of nonsense
r5561 cat hg.pid >> $DAEMON_PIDS
Dirkjan Ochtman
hgweb: don't choke when an inexistent style is requested (issue1901)
r9842
Brendan Cully
hgweb: simple tests
r3942 echo % manifest
Bryan O'Sullivan
Allow tests to run in parallel.
r5384 ("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/file/tip/?style=raw')
("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/file/tip/da?style=raw')
Bryan O'Sullivan
hgweb: return meaningful HTTP status codes instead of nonsense
r5561
echo % plain file
"$TESTDIR/get-with-headers.py" localhost:$HGPORT '/file/tip/foo?style=raw'
echo % should give a 404 - static file that does not exist
"$TESTDIR/get-with-headers.py" localhost:$HGPORT '/static/bogus'
echo % should give a 404 - bad revision
"$TESTDIR/get-with-headers.py" localhost:$HGPORT '/file/spam/foo?style=raw'
echo % should give a 400 - bad command
Bryan O'Sullivan
hgweb: account for Python 2.4 in one test
r5564 "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/file/tip/foo?cmd=spam&style=raw' | sed 's/400.*/400/'
Bryan O'Sullivan
hgweb: return meaningful HTTP status codes instead of nonsense
r5561
echo % should give a 404 - file does not exist
"$TESTDIR/get-with-headers.py" localhost:$HGPORT '/file/tip/bork?style=raw'
Dirkjan Ochtman
hgweb: better error messages
r6368 "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/file/tip/bork'
"$TESTDIR/get-with-headers.py" localhost:$HGPORT '/diff/tip/bork?style=raw'
Bryan O'Sullivan
hgweb: return meaningful HTTP status codes instead of nonsense
r5561
Dirkjan Ochtman
hgweb: don't choke when an inexistent style is requested (issue1901)
r9842 echo % try bad style
("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/file/tip/?style=foobar')
Mirko Friedenhagen
server: append to logfiles
r5690 echo % stop and restart
Mads Kiilerich
tests: use killdaemons in hgweb tests...
r7428 "$TESTDIR/killdaemons.py"
Mirko Friedenhagen
server: append to logfiles
r5690 hg serve -p $HGPORT -d --pid-file=hg.pid -A access.log
cat hg.pid >> $DAEMON_PIDS
# Test the access/error files are opened in append mode
python -c "print len(file('access.log').readlines()), 'log lines written'"
Bryan O'Sullivan
hgweb: return meaningful HTTP status codes instead of nonsense
r5561 echo % static file
"$TESTDIR/get-with-headers.py" localhost:$HGPORT '/static/style-gitweb.css'
Dirkjan Ochtman
better error reporting for hg serve errors in tests
r5924
echo % errors
cat errors.log