comparison tests/test-hgwebdir.t @ 27184:64187e9a5659

hgweb: load server settings from --web-conf (issue4699) It copies the ui before loading the webconf and passes the copied ui only to the service. This way, the hgwebdir app can reload configs cleanly.
author Yuya Nishihara <yuya@tcha.org>
date Sat, 31 Oct 2015 22:50:03 +0900
parents 4b0fc75f9403
children 3643b66d7f71
comparison
equal deleted inserted replaced
27183:0945539a3a6b 27184:64187e9a5659
1179 1179
1180 1180
1181 </body> 1181 </body>
1182 </html> 1182 </html>
1183 1183
1184
1185 test listening address/port specified by web-conf (issue4699):
1186
1187 $ killdaemons.py
1188 $ cat >> paths.conf <<EOF
1189 > [web]
1190 > address = localhost
1191 > port = $HGPORT1
1192 > EOF
1193 $ hg serve -d --pid-file=hg.pid --web-conf paths.conf \
1194 > -A access-paths.log -E error-paths-9.log
1195 listening at http://*:$HGPORT1/ (bound to 127.0.0.1:$HGPORT1) (glob)
1196 $ cat hg.pid >> $DAEMON_PIDS
1197 $ get-with-headers.py localhost:$HGPORT1 '?style=raw'
1198 200 Script output follows
1199
1200
1201
1202 test --port option overrides web.port:
1203
1204 $ killdaemons.py
1205 $ hg serve -p $HGPORT2 -d -v --pid-file=hg.pid --web-conf paths.conf \
1206 > -A access-paths.log -E error-paths-10.log
1207 listening at http://*:$HGPORT2/ (bound to 127.0.0.1:$HGPORT2) (glob)
1208 $ cat hg.pid >> $DAEMON_PIDS
1209 $ get-with-headers.py localhost:$HGPORT2 '?style=raw'
1210 200 Script output follows
1211
1212
1213
1214
1215 $ killdaemons.py
1184 $ cat > collections.conf <<EOF 1216 $ cat > collections.conf <<EOF
1185 > [collections] 1217 > [collections]
1186 > $root=$root 1218 > $root=$root
1187 > EOF 1219 > EOF
1188 $ hg serve --config web.baseurl=http://hg.example.com:8080/ -p $HGPORT2 -d \ 1220 $ hg serve --config web.baseurl=http://hg.example.com:8080/ -p $HGPORT2 -d \
1336 1368
1337 paths errors 8 1369 paths errors 8
1338 1370
1339 $ cat error-paths-8.log 1371 $ cat error-paths-8.log
1340 1372
1373 paths errors 9
1374
1375 $ cat error-paths-9.log
1376
1377 paths errors 10
1378
1379 $ cat error-paths-10.log
1380
1341 collections errors 1381 collections errors
1342 1382
1343 $ cat error-collections.log 1383 $ cat error-collections.log
1344 1384
1345 collections errors 2 1385 collections errors 2