diff tests/test-hgwebdir @ 9363:8635b33eaade

hgweb: add web.descend configuration variable
author Dirkjan Ochtman <dirkjan@ochtman.nl>
date Wed, 19 Aug 2009 12:47:04 +0200
parents f6eb03027411
children 6d87c20cd7a8
line wrap: on
line diff
--- a/tests/test-hgwebdir	Tue Aug 18 13:59:30 2009 +0200
+++ b/tests/test-hgwebdir	Wed Aug 19 12:47:04 2009 +0200
@@ -29,6 +29,7 @@
 root=`pwd`
 cd ..
 
+
 cat > paths.conf <<EOF
 [paths]
 a=$root/a
@@ -50,6 +51,7 @@
 echo % should give a 404 - repo is not published
 "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/c/file/tip/c?style=raw'
 
+
 cat > paths.conf <<EOF
 [paths]
 t/a/=$root/a
@@ -83,6 +85,24 @@
 "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/rcoll/b/d/file/tip/d?style=raw'
 
 
+"$TESTDIR/killdaemons.py"
+cat > paths.conf <<EOF
+[paths]
+t/a = $root/a
+t/b = $root/b
+c = $root/c
+[web]
+descend=false
+EOF
+
+hg serve -p $HGPORT1 -d --pid-file=hg.pid --webdir-conf paths.conf \
+    -A access-paths.log -E error-paths-3.log
+cat hg.pid >> $DAEMON_PIDS
+echo % test descend = False
+"$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/?style=raw'
+"$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/t/?style=raw'
+
+
 cat > collections.conf <<EOF
 [collections]
 $root=$root
@@ -99,9 +119,12 @@
 "$TESTDIR/get-with-headers.py" localhost:$HGPORT2 '/b/file/tip/b?style=raw'
 "$TESTDIR/get-with-headers.py" localhost:$HGPORT2 '/c/file/tip/c?style=raw'
 
+
 echo % paths errors 1
 cat error-paths-1.log
 echo % paths errors 2
 cat error-paths-2.log
+echo % paths errors 3
+cat error-paths-3.log
 echo % collections errors
 cat error-collections.log