comparison tests/test-http.t @ 28549:e01bd7385f4f

tests: reorder hg serve commands chg currently does not support hg serve -d. It has a quick path testing if the command is hg serve -d and fallbacks to hg if so. But the test only works if "serve" is the first argument since the test wants to avoid false positives (for example, "-r serve" is different). This patch reorders "hg server" commands in tests, making them chg friendly.
author Jun Wu <quark@fb.com>
date Tue, 15 Mar 2016 09:51:54 +0000
parents 29cfc474c5fd
children b74ca9ace65e
comparison
equal deleted inserted replaced
28548:b7a31068cc80 28549:e01bd7385f4f
11 adding foo 11 adding foo
12 adding foo.d/bAr.hg.d/BaR 12 adding foo.d/bAr.hg.d/BaR
13 adding foo.d/baR.d.hg/bAR 13 adding foo.d/baR.d.hg/bAR
14 adding foo.d/foo 14 adding foo.d/foo
15 $ hg serve -p $HGPORT -d --pid-file=../hg1.pid -E ../error.log 15 $ hg serve -p $HGPORT -d --pid-file=../hg1.pid -E ../error.log
16 $ hg --config server.uncompressed=False serve -p $HGPORT1 -d --pid-file=../hg2.pid 16 $ hg serve --config server.uncompressed=False -p $HGPORT1 -d --pid-file=../hg2.pid
17 17
18 Test server address cannot be reused 18 Test server address cannot be reused
19 19
20 #if windows 20 #if windows
21 $ hg serve -p $HGPORT1 2>&1 21 $ hg serve -p $HGPORT1 2>&1
152 > if base64.b64decode(auth.split()[1]).split(':', 1) != ['user', 'pass']: 152 > if base64.b64decode(auth.split()[1]).split(':', 1) != ['user', 'pass']:
153 > raise common.ErrorResponse(common.HTTP_FORBIDDEN, 'no') 153 > raise common.ErrorResponse(common.HTTP_FORBIDDEN, 'no')
154 > def extsetup(): 154 > def extsetup():
155 > common.permhooks.insert(0, perform_authentication) 155 > common.permhooks.insert(0, perform_authentication)
156 > EOT 156 > EOT
157 $ hg --config extensions.x=userpass.py serve -p $HGPORT2 -d --pid-file=pid \ 157 $ hg serve --config extensions.x=userpass.py -p $HGPORT2 -d --pid-file=pid \
158 > --config server.preferuncompressed=True \ 158 > --config server.preferuncompressed=True \
159 > --config web.push_ssl=False --config web.allow_push=* -A ../access.log 159 > --config web.push_ssl=False --config web.allow_push=* -A ../access.log
160 $ cat pid >> $DAEMON_PIDS 160 $ cat pid >> $DAEMON_PIDS
161 161
162 $ cat << EOF > get_pass.py 162 $ cat << EOF > get_pass.py